Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      I am using XStream 1.0.2. The following two codes produce the same output:

      --------------- Sample 1 --------------
      final XStream x1 = new XStream(new DomDriver("UTF-8"));
      x1.toXML(teststring, new FileWriter("test-encoding-1.xml"));

      --------------- Sample 2 --------------
      final XStream x2 = new XStream(new DomDriver());
      x2.toXML(teststring, new FileWriter("test-encoding-2.xml"));

      --------------- End Samples -----------

      Given the teststring variable is "Ää Öö Üu", the output for both is identical:

      00000000h: 3C 73 74 72 69 6E 67 3E ; <string>
      00000008h: C4 E4 20 D6 F6 20 DC FC ; Ää Öö Üü
      00000010h: 3C 2F 73 74 72 69 6E 67 ; </string
      00000018h: 3E ; >

      Obviously, the umlaut encoding does not take place in UTF-8, which (to my expectations) would look like this:

      00000000h: 3C 73 74 72 69 6E 67 3E ; <string>
      00000008h: C3 84 C3 A4 20 C3 96 C3 ; Ää Ã-Ã
      00000010h: B6 20 C3 9C C3 BC 3C 2F ; ¶ Üü</
      00000018h: 73 74 72 69 6E 67 3E ; string>

      The encoding of the above code snippets rather take place in my Windows XPs default encoding schema ISO-8859-1.

        Issue Links

          People

          • Assignee:
            Unassigned
            Reporter:
            Daniel Frey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: