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
Post by:Ulf Dittmer
, Rancher
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 ]
Post by:Srinivas Kalvala
, Ranch Hand
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.
Post by:Ilja Preuss
, Sheriff
If you use a standard XML parser and JDBC, isn't encoding taken care of automatically?
Post by:Manuel Palacio
, Ranch Hand
I usually base-64 encode it, store in the DB and then decode with:
Post by:Lily Boland
, Greenhorn
Thank you all for the helpful info!
Post by:autobot
bacon. tiny ad:
Thread Boost - a very different sort of advertising