DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36483>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36483

           Summary: german umlaut are not correct converted to XML while
                    writing svg to file
           Product: Batik
           Version: 1.6
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: SVG DOM
        AssignedTo: batik-dev@xml.apache.org
        ReportedBy: [EMAIL PROTECTED]


The methode DOMUtilities.contentToString do not convert german umlauts.
I suggest to change this methode like this:

    public static String contentToString(String s) {
        StringBuffer result = new StringBuffer();

        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);

            switch (c) {
            case '<':
                result.append("&#60;");
                break;
            case '>':
                result.append("&#62;");
                break;
            case '&':
                result.append("&#38;");
                break;
            case '"':
                result.append("&#34;");
                break;
            case '\'':
                result.append("&#39;");
                break;
            case 'ä':
                result.append("&#228;");
                break;
            case 'Ä':
                result.append("&#196;");
                break;
            case 'ü':
                result.append("&#252;");
                break;
            case 'Ü':
                result.append("&#220;");
                break;
            case 'ö':
                result.append("&#246;");
                break;
            case 'Ö':
                result.append("&#214;");
                break;
            case 'ß':
                result.append("&#223;");
                break;
            default:
                result.append(c);
            }
        }
        
        return result.toString();
    }

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to