Closed GoogleCodeExporter closed 9 years ago
hello ...
have u managed to do it ?
I have the same problem in translatin from russian ... with cyrillic characters.
i managed to bypass that by setting my reading document from unicode to utf8
before running and then setting it back to unicode.
i have found here
http://stackoverflow.com/questions/361975/setting-the-default-java-character-enc
oding that one should initialize the vm character encode before running
anything. but that still didn't work ...
i have also read that one can set "User-Defined File Attributes" but i have yet
to test that.
if you have done it please post it so I may take a crack at it. thank you.
Original comment by AnDrei...@gmail.com
on 28 Oct 2010 at 6:56
This is down to your operating system or perhaps the application using the jar,
for example maybe your IDE. It's not an issue with the library itself. I'm not
a Windows user so I can't offer any further info. Closing.
Original comment by rich.mid...@gmail.com
on 6 Nov 2010 at 4:53
I resolve it in the following way:
...
FileOutputStream fos = new FileOutputStream(file.getCanonicalFile());
Writer writer = new OutputStreamWriter(fos, "UTF-8");
writer.write(contents);
writer.close();
...
where contents is a string translated using Google API Translate.
Using this template you can write in each encoding supported by your JRE/JDK.
Original comment by tomasz.l...@gmail.com
on 7 Nov 2010 at 7:34
Original issue reported on code.google.com by
tomasz.l...@gmail.com
on 28 Sep 2010 at 12:21