[Logo]
Forums Register Login
UTF-8
Hello,

Does any one know a good way to parse in a UTF-8 xml file, store it in ASCII in DB, and export it back to UTF-8 format?

Thanks,
Lily
Just to ask the obvious, is there no way to run the DB in Unicode mode, instead of ASCII?

One possibility would be to base-64 encode the string with a library like Jakarta Commons Codec.
[ August 30, 2006: Message edited by: Ulf Dittmer ]
Hello,

I am not clear but just thinking about following ...

The Reader and writer streams will convert back and forth of UTF format. First write your file into a ByteArrayOutputStream then store it in DB and after reading the data from DB again construct it with Reader.

UTF -----> Writer(Stream); -----> DB

DB ---> Reader(Stream) ---> UTF format

Please correct me If anything wrong.

Thank you.
If you use a standard XML parser and JDBC, isn't encoding taken care of automatically?
I usually base-64 encode it, store in the DB and then decode with:

Thank you all for the helpful info!
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Nov 19, 2017 19:35:47.