M
Mike Schilling
I've created a simple .NET 1.1 web service using VS.NET 2003: it has one
method that takes a string parameter. It iterates through the input string,
turning each character into hex and appending it to an output string, and
returns the result.
I now send this service SOAP messages containing non-ASCII characters in the
field that becomes the input string. Each SOAP message has an XML header
that correctly describes the format of the non-ASCII characters. (I've
tried both iso-8859-1 and utf-8).
For some reason, each XML character that's non-ASCII has been turned into a
question mark "?" in the input string. Actually, a UTF-8 character that
contains two bytes becomes two question marks. This happens before any of
my code (or any code VS.NET is willing to show me) runs, so I'm at a loss to
know how to investigate it. Question marks are often generated when trying
to represent a character in a character set that doesn't contain it, but in
this case the target is a C# string, which can represent any Unicode
character.
I'd appreciate any insights about this.
method that takes a string parameter. It iterates through the input string,
turning each character into hex and appending it to an output string, and
returns the result.
I now send this service SOAP messages containing non-ASCII characters in the
field that becomes the input string. Each SOAP message has an XML header
that correctly describes the format of the non-ASCII characters. (I've
tried both iso-8859-1 and utf-8).
For some reason, each XML character that's non-ASCII has been turned into a
question mark "?" in the input string. Actually, a UTF-8 character that
contains two bytes becomes two question marks. This happens before any of
my code (or any code VS.NET is willing to show me) runs, so I'm at a loss to
know how to investigate it. Question marks are often generated when trying
to represent a character in a character set that doesn't contain it, but in
this case the target is a C# string, which can represent any Unicode
character.
I'd appreciate any insights about this.