Re: Encoding conversion problem



Hi Silvio,
the settings are taken from the DB2 instance of a customer (and I
can't change them). The very same code works, of course, without
problems with a DB2 instance configured with ISO-8859-1.

The problem arises also when a C program stores to DB a string with
non-IBM850 valid characters: another C program can read the string
without problems while Java can't; so the string is not corrupted when
saved to DB but someone (JDBC driver? Java I/O?) looses something when
I read the field with Resultset.getString(int index) and I can't
convert it correctly (or I haven't found the right way to do it yet,
if it exists...).

BTW: a test has been made on DB2 with a table with a field declared
CHAR(n) FOR BIT DATA and Java code works without problems reading and
writing non-IBM850 characters.

Having read your feedback (THANK YOU EVERYONE!) I would say that
there's no way to read back those characters in Java in my
application.

Thanks again,
Andrea
.



Relevant Pages

  • Re: Encoding conversion problem
    ... the settings are taken from the DB2 instance of a customer (and I ... non-IBM850 valid characters: another C program can read the string ... Java I/O?) ...
    (comp.lang.java.databases)
  • Re: Text search with accented characters
    ... >convert it to unaccented characters? ... I want to search a big string for a ... >test string, ignoring accents on characters. ... but I don't think I have seen one in Java. ...
    (comp.lang.java.programmer)
  • Re: Validating a String in Java
    ... If a user enters characters other than the mentioned above, ... I also had writing the same in Java Script but then due to the ... You can use the Pattern class to determine if your string matches those characters using Regular Expressions. ... The problem with JavaScript validation is that the client might disable or circumvent the ...
    (comp.lang.java.programmer)
  • Re: drawString with special Unicode characters to Graphics object
    ... 4.1.0-alpha does not support Unicode, so there is the first problem. ... some improvement in that I can now see special characters IF I query ... displays the string "Haussömmern", incl. ... Java program does things like this: ...
    (comp.lang.java.programmer)
  • Re: Confusion about I/O Streams
    ... > I have to admit I've never fully understood the different Java I/O streams ... > so I've been reviewing them in the Java Tutorial. ... Characters are a higher-level abstraction than bytes. ... If you've got a String, you can get a bytefrom it using: ...
    (comp.lang.java.help)