tags:

views:

143

answers:

1

Hello, I am having this problems in grails where I am writing a string from the database into an xml file using StreamingMarkUpBuilder. The xml file displays the string as htmlentities &#x30b3 &#x30d4 &#x30fc, how can I convert them to be printed as コピー?

Thanks!

A: 

I found a solution for this, I used OutputStreamWriter instead of FileWriter to enfored encoding to UTF-8

Anthony Umpad
FileWriter (and FileReader) is very badly designed because it does not allow specifying a charset (which is usually better than relying on the platform default encoding). BTW, you might have had more luck getting an answer here if you'd shown the relevant code.
Michael Borgwardt