Altova Mailing List Archives


Re: Umlaut characters in Unicode

From: "Steve W. Jackson" <stevewjackson@-------.--->
To: NULL
Date: 11/12/2004 2:46:00 PM
In article <2vkeadF2lqg92U1@u...>,
 Jürgen Kahrs <Juergen.KahrsDELETETHIS@v...> wrote:

>:Martin Honnen wrote:
>:
>:> Why is an umlaut a problem? Unicode certainly contains/allows umlaut 
>:> characters.
>:
>:Umlaut is not a problem for Unicode.
>:Umlaut is a problem if you write a text
>:with an editor in ISO-8859-1 mode and
>:watch the text with an editor in UTF-8
>:mode.
>:
>:For example, while writing this posting,
>:I use ISO-8859-1 mode and this is an u-Umlaut: ü
>:Now, switch your news reader to UTF-8 and you
>:will find that the character does not look like
>:an u-umlaut anymore.

That's precisely the problem we've encountered with our application, 
which stores its data in UTF-8 encoded XML documents.

We maintain everything internally in our Java application as part of a 
DOM, and it's saved to an external file on request.  But we failed to 
force the byte stream written to the file to be encoded to UTF-8, so it 
used the default ISO-8859-1 on our American systems.  When the next 
attempt was made to read the file (only if such characters appeared), 
errors occurred because there were non-UTF-8 characters present.

The solution we found was to serialize the DOM with UTF-8 encoding 
specified (which we were already doing) and then also specify UTF-8 
encoding on the output file stream when writing.  When this was done, 
opening such an XML file in an editor clearly showed something that did 
not resemble the letter with umlaut, or accent, or other special feature.

= Steve =
-- 
Steve W. Jackson
Montgomery, Alabama

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.