|
Re: character encoding in DODS: msg#00021java.enhydra.general
Hi, Well, I don't think the solutions has been accepted. Our context : - All data is stored in postgres in unicode. - Storing is just fine - retreived values from small varchar field was OK, but fields that are longvarchar are badly retreived. What we did : - We added a step to correctly reread the data in utf-8 in business layer (i.e. dump chars->bytes using the default encoding then read bytes->chars using utf-8 encoding. It was quite OK for a time (in enh 3.5b and enh 5.0, I did not switch this app to enh 5.1). Now, we have a new problem arising only under some circumstances : When deploying on a linux server with JDK 1.4.{1,2}, the unicode bytes are transformed into plain "?". This is apparently done by the JDK when 8 bytes chars are encontered (Maybe the default encoding of the JDK was plain ASCII). In this case, there is no way to reread the data which is permanently damaged... On the same linux box, with JDK 1.3.x, no problem. On a Mac OS X plateform (the one we develop on) with JDK 1.3 and JDK 1.4.x: no problem also. The only way to guaranty that everything will be OK on all plateform is to ALWAYS specify the encoding when reading data from a database. But you have to specifically know the encoding of the database. I'm no specialist of JDBC, so I don't know what are really the issues here (especially when storing is correct and reading is not...) Regards, Gilles, On 18 déc. 03, at 12:00, Petr Stehlik wrote: Hi,-- Gilles Sérasset GETA-CLIPS-IMAG (UJF, INPG & CNRS) BP 53 - F-38041 Grenoble Cedex 9 Phone: +33 4 76 51 43 80 Fax: +33 4 76 44 66 75
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | character encoding in DODS, Petr Stehlik |
|---|---|
| Next by Date: | Re: Enhydra: character encoding in DODS, Daniel Germain |
| Previous by Thread: | character encoding in DODS, Petr Stehlik |
| Next by Thread: | Re: Enhydra: character encoding in DODS, Daniel Germain |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |