R
R. K. Wijayaratne
We are using .NET 2.0 and WSE 3.0 to call a Java web service. It sets
charcter limits to certain feilds (e.g. max 100 chars) and if there
are more than the expected number, it throws an error. So what we do
is we retrieve the data from the MSSQL database, truncate it to 100
characters if it is over the limit, and then call the web service.
The problem is sometimes extra 'invisible' characters get inserted
into the field data that take the field over the character limit.
These characters are there, but are not visible when I open the XML
logs files in Notepad, Visual Studio and Altova XMLSpy, but they are
visible when I open them in the free Context Editor.
For example note the extra 'Â' char in the field below, which takes
the character count to 101 and thus over the limit by 1.
<Neighbourhood>Elizabeth North is one of the older suburbs, with
development dating from the 1950s and 1960s, as mu</Neighbourhood>
It seems that these characters are 'invisible' to the .NET String
manipulation methods, which does not seem to count them when counting
characters for truncation.
Any ideas what is happening here???
charcter limits to certain feilds (e.g. max 100 chars) and if there
are more than the expected number, it throws an error. So what we do
is we retrieve the data from the MSSQL database, truncate it to 100
characters if it is over the limit, and then call the web service.
The problem is sometimes extra 'invisible' characters get inserted
into the field data that take the field over the character limit.
These characters are there, but are not visible when I open the XML
logs files in Notepad, Visual Studio and Altova XMLSpy, but they are
visible when I open them in the free Context Editor.
For example note the extra 'Â' char in the field below, which takes
the character count to 101 and thus over the limit by 1.
<Neighbourhood>Elizabeth North is one of the older suburbs, with
development dating from the 1950s and 1960s, as mu</Neighbourhood>
It seems that these characters are 'invisible' to the .NET String
manipulation methods, which does not seem to count them when counting
characters for truncation.
Any ideas what is happening here???