Re: [Simple-support] Encoding of characters
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2008-02-04 19:30:56
|
Hi,
You can do the following do deserialize.
Object x = new Persister().read(new
FileInputStream("file.xml"), "UTF-8")
This will read the file in UTF-8. There should be no
issues. I have a test case for this also.
Let me know if you still see the issue, it should work
fine.
Niall
--- Timo Rumland <cr...@ol...> wrote:
> Hello,
>
> I love to use the Simple XML Framework, it makes
> things so much easier
> for me.
>
> I have a question regarding character encoding. I
> have this XML file:
>
> --------
> <?xml version="1.0" encoding="UTF-8"?>
> <navigationBarModel>
> <node text="sampletext"/>
> </navigationBarModel>
> --------
>
> I can deserialize it without problems. But when the
> text attribute of
> the "node" tag is set to a text with a character
> other than in the
> ASCII set, e.g. "another character: Ä" (Ä is the
> german umlaut for the
> character A), the deserialization of the text
> attibute is not correct.
> The text-string contains something like
>
> "another character: Ã"
>
> How can I use characters from the Unicode encoding
> in my xml
> tags/attributes?
>
>
> Thanks a lot for your help!
>
>
> Regards,
> Timo Rumland
>
>
>
-------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio
> 2008.
>
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
>
https://lists.sourceforge.net/lists/listinfo/simple-support
>
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
|