|
|
|
|||||
|
I use ice java client to get chinese string from Ice c++ server,but it show "?"all.
Ice Server: Linux 2.4.30 + gcc 3.3.4 + Ice-3.0 + ISO-8859-1 Ice Client: Windows 2000 + Jdk 1.5 + IceJ-2.1.2 + GBK I solved this problem by calling iconv in c ; this function help me transfer gbk to utf8 , then java receive the string in right coding format. But my question is: if I do not transfer gbk to utf8 in c, how can java receive the string in right coding format? May you provide some advice . Thank u so much!! |
|
|||||
|
my question is that...
Quote:
I have try to provide UTF-8 strings,and java can receive the string in right coding format. But my question is: For several reason I do not want to change my c source (it provide GBK strings , it do not transfer gbk to utf8 in c), how can java receive the string in right coding format? I guess if I could modify the ice.jar source(BasicStream.class) to let java receive the string wIth GBK? or any other way? May you provide some advice for my question ? Thanks a lot Cheers, Koko. |
|
||||||
|
Quote:
Quote:
Cheers, Benoit. |
|
|||||
|
How can I make change in the java client to let work right.
Quote:
in my project ,client must receive the string in GBK. Except the java client,other clients should use the string in GBK. How can I make change in the java client to let work right. |
|
||||||
|
Ice requires that all strings are transmitted as UTF-8. If you don't do that, then you will run into problems with other language mappings as well, such as Ice for Python.
You could certainly hack your Ice for Java client so that it converts GBK to UTF-8, but we do not provide any support for this. As Benoit says, the correct solution is to convert GBK to UTF-8 at your C++ server, using an appropriate implementation of our string converter. |
|
||||||
|
I'd also recommend to read my article "Ice and Character Encoding" in issue 16 of the Connections.
Cheers, Bernard |
|
|||||
|
Quote:
Cheers, Koko |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Encoding Problem about Chinese, client compiled by Java, server compiled by C++ | richardma | Help Center | 6 | 12-21-2005 12:00 AM |
| encoding error when Ice java client get string from Ice c++ server | casper | Help Center | 1 | 09-16-2005 04:01 AM |
| Q on Data encoding | ChMeessen | Comments | 3 | 01-28-2005 10:19 AM |
| Client.exe run error in VirtualPC Win98 | chenhong_sz | Help Center | 3 | 01-28-2005 06:37 AM |
| IceSSL encoding | nsns | Bug Reports | 4 | 01-26-2005 05:03 AM |