Internationalization and Java Strings

Avinash Lakshman <[email protected]> Tue, 22 Apr 2008 11:01:36 -0500
Newsgroups gmane.comp.windows.devel.java.advanced
Message-ID <[email protected]>
Hi
=20
I have been reading up a bit on Internationalization and how the Collation =
API's help out with searching and sorting of Strings etc. But if I had a ne=
ed to store a String to file and this String could have weird characters in=
 them how should I be storing them. Should I convert it to a byte[] and sto=
re them, use the writeUTF() method on one of the OutputStream classes or sh=
ould I be doing something special? The requirement is I store them and late=
r retrieve them for various comparisons against strings that would have wei=
rd characters in them. For eg. I would store a string "Can=E2" and later re=
trieve it to compare it with some string that gets passed in via some metho=
d call. What is the best way of doing this? If I store them using writeUTF(=
) and later read them using readUTF() would the special characters be strip=
ped out?
=20
Thanks
Avinash
_________________________________________________________________
Spell a grand slam in this game where word skill meets World Series. Get in=
 the game.
http://club.live.com/word_slugger.aspx?icid=3Dword_slugger_wlhm_admod_april=
08=

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This list is hosted by DevelopMentor=AE  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com