|
Re: Character Encoding [message #1409433 is a reply to message #1409178] |
Mon, 18 August 2014 05:12 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Rui,
Comments below.
On 17/08/2014 11:54 AM, Rui Domingues wrote:
> Hi everyone
>
> I'm struggling for some days with char encoding problem.
>
> No matter if I save my resource with UTF-8, or ASCII, with
> options.put(XMLResource.OPTION_ENCODING, "UTF-8");
>
> the persisted XML mirrors that reality <?xml encoding=...>
>
> however, when I load the resource with the same options, it always
> give me strings like "a��o�" if they have latin characters.
When loading, the encoding in the XML itself is used, i.e.,
XMLResource.OPTION_ENCODING is a save option. Furthermore, the
processing to convert the bytes to characters is done by SAX itself, so
if the right characters are not coming out, then the problem must be
that the right characters are not in the file itself. One way this
could happen is if you edit the file and save it with an encoding
different from what's declared in the XML header.
>
> Anyone can help me?
It's hard to saw where things have gone wrong from what you've described...
>
> Thanks in advance
> rui domingues
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Character Encoding [message #1412532 is a reply to message #1409433] |
Tue, 26 August 2014 11:47 |
Rui Domingues Messages: 194 Registered: October 2010 |
Senior Member |
|
|
Hi. Thanks for replying.
Actually, I think my problem is related to another thing.
I'm creating an Eclipse IFile from an InputStream which is created from a string containing the model.
After that I get XMIResource from this file.
Is that possible my problem is related with the fact of being creating an eclipse file first.
Thanks in advance
rui domingues
[Updated on: Tue, 26 August 2014 11:48] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.82091 seconds