db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark D. Johnson" <markdjon...@att.net>
Subject Re: Problem Inserting Swedish Characters in Derby Database
Date Thu, 29 Jul 2010 00:43:28 GMT
  Hi Kristian -

Thank you for your help.  Your suggestion was correct.  After some 
Googling I found this page: 
which explains the problem I had.  It turns out that the Windows command 
prompt defaults to a different code page than other parts of Windows.  
By changing the code page and the font for the command prompt as 
described in the above article, I was able to get the characters to 
display properly.

Regards -

Mark Johnson

On 7/27/2010 2:41 PM, Kristian Waagan wrote:
> Hi Mark,
> Your little program produces the expected output for me. I can see 
> both the lower and upper case versions of the three last letters in 
> the Swedish alphabet correctly (as depicted on [1]). I copied the 
> program from your mail and pasted it into a file using vim in my 
> terminal.
> The question mark suggests a problem with your terminal settings. Are 
> you sure you're using a locale that can display/represent those letters?
> (I guess things could go wrong both on the OS side and on the Java 
> side, the machine I tested on happened to use nb_NO.UTF-8)
> Strings in Derby is stored as UTF-8 on disk, and are represented as 
> Java chars when decoded or being inserted as a String/Reader. To rule 
> out problems with storing and fetching, you could look up the Unicode 
> code points and make sure you get back what you put in. When I did 
> that, I could see that the code points that went in and came back out 
> were consistent with the contents of the Unicode chart "C1 Controls 
> and Latin-1 Supplement" (for instance \u00D6 and \u00E4).
> For completeness, which platform/OS are you seeing the trouble on?

View raw message