Parse special Characters as UTF-8 ( Odin Fixes )

Results 1 to 12 of 12
  1. #1
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Parse special Characters as UTF-8 ( Odin Fixes )

    well I think most of you guys would have known by now that there are korean and other strings in the xml that you dump, this pretty much force the xml to parse it in UTF-8 format :)

    Go To XMLDomMapleData
    // add the following code

    Code:
     DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
                Reader reader = new InputStreamReader(fis, "UTF-8"); // Parse Special Characters Using UTF-8
                InputSource source = new InputSource(reader);
                Document document = documentBuilder.parse(source);
    credits to Hendi for his XML Dumper..

    this should pretty much fix the issue with unable to dump for v145+ MalformedByteSequenceException
    encountered it while dumping quest
    Last edited by ExtremeDevilz; 08-02-14 at 09:42 AM. Reason: Correction


  2. #2
    Account Upgraded | Title Enabled! ngnam87 is offline
    MemberRank
    Mar 2013 Join Date
    666Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    did i edit true?
    this.node = documentBuilderFactory.newDocumentBuilder().parse(fis,"UTF-8").getFirstChild();

  3. #3
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    I have no idea..

    just follow mine it works just fine..

  4. #4
    Account Upgraded | Title Enabled! ngnam87 is offline
    MemberRank
    Mar 2013 Join Date
    666Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    i saw your code, you define param reader, source, document but never call it. So i cannot use!

  5. #5
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    Quote Originally Posted by ngnam87 View Post
    i saw your code, you define param reader, source, document but never call it. So i cannot use!
    what you meant I never call it ????

    Code:
    public XMLDomMapleData(FileInputStream fis, File imageDataDir) {        try { 
            	
                DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
                Reader reader = new InputStreamReader(fis, "UTF-8"); // Parse Special Characters Using UTF-8
                InputSource source = new InputSource(reader);
                Document document = documentBuilder.parse(source);        
                
                this.node = document.getFirstChild();
            } catch (ParserConfigurationException | SAXException | IOException e) {
                throw new RuntimeException(e);
            }
            this.imageDataDir = imageDataDir;
        }

  6. #6
    Account Upgraded | Title Enabled! ngnam87 is offline
    MemberRank
    Mar 2013 Join Date
    666Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    Quote Originally Posted by Multo View Post
    what you meant I never call it ????

    Code:
    public XMLDomMapleData(FileInputStream fis, File imageDataDir) {        try { 
                
                DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
                DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
                Reader reader = new InputStreamReader(fis, "UTF-8"); // Parse Special Characters Using UTF-8
                InputSource source = new InputSource(reader);
                Document document = documentBuilder.parse(source);        
                
                this.node = document.getFirstChild();
            } catch (ParserConfigurationException | SAXException | IOException e) {
                throw new RuntimeException(e);
            }
            this.imageDataDir = imageDataDir;
        }
    now you call but main post

  7. #7
    C# developer xStr0nGx is offline
    MemberRank
    Dec 2013 Join Date
    UnknownLocation
    659Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    Good job google posts!

    You are the best!!

  8. #8
    <3 Dynamik is offline
    MemberRank
    Feb 2011 Join Date
    TorontoLocation
    532Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    Quote Originally Posted by Multo View Post
    I have no idea..

    just follow mine it works just fine..
    ...

    It seems like you don't even understand your own release.

  9. #9
    Account Upgraded | Title Enabled! ExtremeDevilz is offline
    MemberRank
    Apr 2008 Join Date
    647Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    @Dynamik

    you do know that if he posted the full code it would have been much better.. I can't magically expect and understand what he is trying to do over here.. and besides ot please..

    @xStr0nGx

    I did not google any post.. please stop posting around here..

  10. #10
    C# developer xStr0nGx is offline
    MemberRank
    Dec 2013 Join Date
    UnknownLocation
    659Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    Quote Originally Posted by Multo View Post
    @Dynamik

    you do know that if he posted the full code it would have been much better.. I can't magically expect and understand what he is trying to do over here.. and besides ot please..

    @xStr0nGx

    I did not google any post.. please stop posting around here..
    Yeah sure u didn't,

    yeah, u know how to code but u dont know how answer simple questions related to ur codes,

    ye sure, PR0!!

  11. #11
    Account Upgraded | Title Enabled! AristoCat is offline
    MemberRank
    Apr 2012 Join Date
    947Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    Quote Originally Posted by xStr0nGx View Post
    Yeah sure u didn't,

    yeah, u know how to code but u dont know how answer simple questions related to ur codes,

    ye sure, PR0!!
    neither do you.

  12. #12
    Custom Title Enabled James is offline
    LegendRank
    Jan 2007 Join Date
    DenverLocation
    2,288Posts

    Re: Parse special Characters as UTF-8 ( Odin Fixes )

    Cleaned up a little bit.

    Ya'll get back on topic or I'll be issuing infractions.



Advertisement