XStream
  1. XStream
  2. XSTR-347

German Umlaute are not escaped

    Details

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

      Description

      XSTREAM does not escape German Umlaute (ü) and special characters (ß) correctly leading to invalid XML.

      Example:

      <tree-map>
      <no-comparator/>
      <entry>
      <string>footerText</string>
      <string>Mit freundlichen Grüßen,

      Johan</string>
      </entry>
      </tree-map>

      Testcase:
      public class XStreamTest extends junit.framework.TestCase
      {
      /**
      *

      • @see http://www.w3.org/TR/REC-html40/sgml/entities.html
        */
        public void testUmlaute() { final com.thoughtworks.xstream.XStream xstream = new com.thoughtworks.xstream.XStream(); assertTrue(xstream.toXML("€").equals("<string>€</string>")); assertTrue(xstream.toXML("ß").equals("<string>ß</string>")); assertTrue(xstream.toXML("ä").equals("<string>ä</string>")); assertTrue(xstream.toXML("ö").equals("<string>ö</string>")); assertTrue(xstream.toXML("ü").equals("<string>ü</string>")); assertTrue(xstream.toXML("Ä").equals("<string>Ä</string>")); assertTrue(xstream.toXML("Ö").equals("<string>Ö</string>")); assertTrue(xstream.toXML("Ü").equals("<string>Ü</string>")); }

        }

        People

        • Assignee:
          Unassigned
          Reporter:
          johan1
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: