tags:

views:

153

answers:

3

Hi,

I have an xml web service which I use at work to make a request to. This request, an xml document, includes information such as recipients, subject, body, etc (as a newsletter would contain).

I have an ASP.NET form to enter the above information to, to form the Xml document, and I can type foreign characters (non latin - Japanese, Chinese, Russian etc).

If I step through my code, the foreign characters are displayed ok. The xml has an encoding of utf-8 and I load the strings into the attributes of my xml document so I shouldn't need to do anything at a string level with encoding.

I am on webmail because of an unrelated technical matter, but my boss has Outlook 2007 Pro and hasn't got an email with a foreign text subject line. However, if the xml is manually posted via the internal test harness, as opposed to the .NET way of methods/variables (OOP) etc, it will work. So there is a failing in .NET somewhere.

Any ideas?

A: 

Sorry, I'm confused by some of the details in your question, where things are working, and where things aren't working.

Here are some ideas to experiment with: In Outlook, experiment with "Other Actions", "Encoding". Maybe your boss's Outlook isn't recognizing the encoding.

In Outlook, go to Options, and then look at what's in "Internet Headers". The subject should be encoded as described here: http://stackoverflow.com/questions/271657/how-to-tell-if-a-string-is-base64-or-not#271705

If it isn't, your problem is upstream.

Corey Trager
A: 

Try adding these lines to your ASP.NET site's web.config file (in the system.web section):

<globalization
fileEncoding="iso-8859-1"
requestEncoding="iso-8859-1"
responseEncoding="iso-8859-1"
/>
Ricardo Villamil
A: 

Where is Other Actions?

dotnetdev