Re: [Simple-support] Russian tags
Brought to you by:
niallg
|
From: Niall G. <gal...@ya...> - 2013-01-28 03:30:41
|
Try this
FileInputStream source = new FileInputStream("file.xml")InputStreamReader reader = new InputStreamReader(source, "UTF-8");Persister persister = new Persister();
persister.read(MyClass.class, reader)
--- On Sun, 27/1/13, Алексей Киреев <_l...@in...> wrote:
From: Алексей Киреев <_l...@in...>
Subject: Re: [Simple-support] Russian tags
To: "Niall Gallagher - Yieldbroker" <Nia...@yi...>
Cc: "sim...@li..." <sim...@li...>
Received: Sunday, 27 January, 2013, 1:51 PM
Thank you for answer. Is the way to check first line in XML file <?xml version="1.0" encoding="UTF-8"?> and get "encoding" attribute?
Понедельник, 21 января 2013, 22:43 UTC от Niall Gallagher - Yieldbroker <Nia...@yi...>:
This has more to do with the underlying StAX/DOM implementation. Make sure you reading in the UTF-8 charset.
From: Алексей Киреев [mailto:_l...@in...]
Sent: Tuesday, 22 January 2013 8:03 AM
To: sim...@li...
Subject: [Simple-support] Russian tags
It is able to deserealize document with russian tags? I try it with no success in inner tags (with @Element(name="russiantag"), outer tags are recognized with @Root(name="russiantag") or @Element(...) or @ElementList(...)
W/System.err(27616): org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.Element(data=false, name=Адрес, required=true, type=class java.lang.String) on field 'clientAddress' public java.lang.String com.example.sxp.IBClient.clientAddress
for class com.example.sxp.IBClient at line 6
If i replace russian tags with english - all works ok.
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|