From: Michael B. <mbe...@mb...> - 2006-03-08 11:44:32
|
Thomas Zastrow wrote But when I try to query the database from within Java, the result of the query just contains question-marks: <key>??????</key> Does it really? Where and how are you viewing that "result"? Have you looked at the binary values underlying that string representation? Question marks on the display are usually the result of trying to view data via an application that doesn't understand the character encoding of the data. (Whereas rectangles are usually the result of correct encoding settings but absense of glyphs to render the codepoints concerned correctly). Question marks can also result if a transcoding routine is called with impossible parameters (e.g. ones which cannot be associated with a mapping table between the encodings specified). You have to be careful with Java, because it loves to assume that data is in the default encoding of the machine's locale unless you firmly insist it isn't. Are you sure you have made it very clear to all parts of your application that your encoding is utf-8 and that you want to keep it that way? That is, assuming the encoding is indeed utf-8, and not KOI8-R, which is still taken as the default for Cyrillic text on (too) many *nix platforms. I assume there's no danger it might be CP-1251? Michael Beddow |