[Mono-dev] Difficulties with charset on asp.net applications and mod_mono with 1.9.1, most non-ASCII chars appear as ??

Antti S. Lankila alankila at bel.fi
Mon May 5 05:03:08 EDT 2008

The short: whenever I put one of the multibyte chars into source file, 
be it global.asax or foobar.aspx, I get several ? (question mark) 
characters instead of the desired characters. An example:

<p>ä</p> appears in browser as <p>??</p>.

I think my settings are correct: I have UTF-8 encoded source files, the 
<globalization/> tag says fileEncoding is utf-8, and it used to work 
with 1.2.6 and earlier. Some more symptoms:

* If I put into Application_Start() 'Console.Error.WriteLine("ä")', that 
too emits two ?? into error_log.

* setting <globalization/>'s fileEncoding to ISO-8859-1 doubles the 
number of ? characters in output, as in <p>ä</p> => <p>????</p>. It is 
as if something was converting the two UTF-8 bytes representing ä once 
more to UTF-8, then seeing 4 bytes, and emitting ? for each.

* this problem only seems to affect mod_mono. If I run the application 
through xsp2, it works.

* the bug occurs with mod_mono 1.2.5+xsp 1.2.5, and mod_mono 1.9+xsp 1.9.1.

My mono distribution is the current debian testing's 1.9.1. They haven't 
updated xsp+mod_mono so I compiled those myself to try with updated 
versions. Alas, it did not help. Is there any more information that I 
could offer to help troubleshoot this problem?

I worry that this no-one else is seeing this because there are no 
reports of this on the web. But I get the problem on two systems for 
which I have set up 1.9, albeit through Debian's repositories. It'd be 
really helpful if people with official install could try some of those 
scandinavian characters and tell if they see this too.


More information about the Mono-devel-list mailing list