Thursday, November 12, 2009

Change Locale ubuntu server UTF-8 to ISO-8859-1

I was trying to get some sinhala words from database using java. It was nicely working at on windows. When I moved java program to ubuntu server, it returned some unexpected characters.
That happened because of ubuntu using itz default Locale as UTF-8. But some characters at UTF-8 doesn't support for it. Since that it can't give the real output. Since that you should update your Locale for "ISO-8859-1".
To do that you can update your Locale using

locale-gen en_GB
update-locale LANG=en_GB.ISO-8859-1


Then it you won't be getting any bad character expect you entered ones.
Have fun on developing.

No comments:

Post a Comment