Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Q: charset problem using Java?
Malcolm Dew-Jones (yf110_at_vtn1.victoria.tc.ca) wrote:
: Hello
: My problem is that apostrophe characters (') in my data from an oracle
: database are being returned as question mark characters (?) in output
: generated by a JSP. (The source text of the HTML, not just what it looks
: like in the browser).
: I assume this has something to do with language or codepage or charset
: settings, but I haven't a clue where to start looking to solve this.
: Suggestions appreciated.
Turned out the apostrophe wasn't. It was CHR 146, according to ASCII(), which is a windows character for the right end bracket. It looks almost like an apostrophe, and when I cut and paste it from SQL*Plus then I get a true apostrophe in my editor.
CHR 146 is a control code in unicode, which what java uses, so instead of embedding the actual byte value of 146 in the output page, the JSP was replacing it with a ?.
However, I do not know why the JSP won't embed this particular value, since the value 146 in unicode maps directly to an 8 bit value, and http protocol certainly allows 8 bit data, and the JSP page was even indicating it used the windows cp1252 which includes this value as a character. Received on Fri Apr 19 2002 - 16:55:13 CDT