Webservice and international chars

  • Thread starter Thread starter Nicolas
  • Start date Start date
N

Nicolas

Hello!

I call using C# a webservice (UTF8 encoded) that return a list of
product. I get the requested objets. So far so good. But, in those
objects in all String attributes I get ?? instead of chars with
accents. I tried to call the same webservice in Java and Delphi and I
get the right chars. What's wrong with C# ?

Thanks
Nicolas
 
Nicolas said:
I call using C# a webservice (UTF8 encoded) that return a list of
product. I get the requested objets. So far so good. But, in those
objects in all String attributes I get ?? instead of chars with
accents. I tried to call the same webservice in Java and Delphi and I
get the right chars. What's wrong with C# ?

How are you trying to display the characters?

See http://www.pobox.com/~skeet/csharp/debuggingunicode.html for
general advice about sorting out this kind of problem.
 
Hi Jon,
How are you trying to display the characters?

i try to display it into console, labels, datagrids ... well, everywhere
i can!

I saw your page, and try with what you explain.
The code for '?' is 003f ... it is correct (for '?'), but where are my
accents ?

Here is my code :

string st = webservice.listAttibutes();
Console.Write(st);

it always gives me the same result. I try to convert this string with
System.Text.Encoding tools, but nothing appens.
 
Nicolas Pierot said:
i try to display it into console, labels, datagrids ... well, everywhere
i can!

I saw your page, and try with what you explain.
The code for '?' is 003f ... it is correct (for '?'), but where are my
accents ?

Right, so by the time the string comes back to you it really *is* full
of question marks.
Here is my code :

string st = webservice.listAttibutes();
Console.Write(st);

it always gives me the same result. I try to convert this string with
System.Text.Encoding tools, but nothing appens.

Hmm. I can't say I know much about webservices themselves - have you
had a look at the network traffic to check that the data really is
coming back?
 
Nicolas,

Have you changed the responseEncoding property in the globalization element
of your web.config file?

Richard.
 
Richard

the web.config is used when you run som webservice, isn't it?

This is not my webservice, i just use it and get the response.

Nicolas
 
Back
Top