Re: INSERTINg a Clob in a portable way



On Aug 14, 12:39 pm, Thomas Kellerer <FJIFALSDG...@xxxxxxxxxxxxx>
wrote:
joeNOS...@xxxxxxx wrote on 14.08.2007 21:26:>> What I did so far:

File f = new File("sourcfile.txt");
Reader r = new InputStreamReader(new FileInputStream(f), "UTF-8");
preparedStatement.setCharacterStream(1, r, f.length());

Hi. How about trying setBinaryStream() and send the data as raw bytes?
Joe

Hi Joe,

thanks for the answer, but this would only work if the file's encoding was the
same as the database's encoding.

Thomas

Well, yes, but I would separate the issues. If you have an encoding
that needs
conversion, do it explicitly at the client, and then store and send
the resulting
data as bytes.

.



Relevant Pages

  • Re: Problem viewing messages generated with OWA on Groupwise web c
    ... message properly in IE without manually changing the encoding. ... yahoo.mail to Groupwise web mail, but it does with messages sent from our ... used if a client does understand UTF-8. ... Exchange Server 2003 SP2 ...
    (microsoft.public.exchange.admin)
  • Re: POSTing Chinese characters
    ... your claims of POST'd data experiencing encoding problems does ... Character encoding of data on the client side ... Server locale ... it seems that your issue is a Pocket IE issue. ...
    (microsoft.public.inetserver.iis)
  • Re: Problem viewing messages generated with OWA on Groupwise web c
    ... it is viewable without having to change the encoding. ... using their Groupwise Web client, but I really need to find a solution on the ... used if a client does understand UTF-8. ... Exchange server to site #2, the message is viewable with the GroupWise Web ...
    (microsoft.public.exchange.admin)
  • Re: Problem converting byte[] to string
    ... Why not just find out what encoding those other clients are using? ... > im using sockets to communicate between a client and a server. ... > in ASCII because if i try to use Unicode it just stops working, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [OT] Charset encoding was Re: Cant connect to port 25 from another system
    ... the current version of MSOE handles UTF-7 and UTF-8 just fine. ... content encoding, and the pages have strange characters splattered ... find a broken one that doesn't display correctly in their mail client. ...
    (Fedora)