| View previous topic :: View next topic |
| Author |
Message |
jomanda Enthusiastic Coder
Joined: 19 May 2006 Posts: 70 Location: Germany
|
Hi! i have a problem. if i reply the string to the browser without any changes, it does not work. what is that?
BUT, if i do the getBytes() trick, and i store and read it from db, it does display correctly
Reply with quote
|
| |
|
|
ovigo22 Enthusiastic Coder
Joined: 15 May 2006 Posts: 130
|
Did you check the encoding of the string you get back from the database?
Also, I thought strings were always UTF-16
Reply with quote
|
| |
|
|
Kopilman Enthusiastic Coder
Joined: 25 May 2006 Posts: 162
| |
jomanda Enthusiastic Coder
Joined: 19 May 2006 Posts: 70 Location: Germany
|
i think, that db read/write trick helps only as conversion from byte[] to String all my db communication seem to be iso-8859-2, and i see no problems with it
Reply with quote
|
| |
|
|
PaulKolin Enthusiastic Coder
Joined: 25 May 2006 Posts: 108
| |
ovigo22 Enthusiastic Coder
Joined: 15 May 2006 Posts: 130
|
But if you create one with another encoding from bytes, doesn't it transcode it to UTF-16 in memory?
Reply with quote
|
| |
|
|
Kopilman Enthusiastic Coder
Joined: 25 May 2006 Posts: 162
| |
ovigo22 Enthusiastic Coder
Joined: 15 May 2006 Posts: 130
|
So if you create a string by passing bytes and the appropriate encoding, then do .getBytes() won't that return the UTF-16 bytes?
Reply with quote
|
| |
|
|
Kopilman Enthusiastic Coder
Joined: 25 May 2006 Posts: 162
| |
ovigo22 Enthusiastic Coder
Joined: 15 May 2006 Posts: 130
| |
| Page 1 of 3 |
Goto page 1, 2, 3 Next |
|