[Mono-list] Test ASPX: mod-mono-server2 renders utf-8 encodings as question marks, xsp2 and mod-mono-server OK

Alex Villací­s Lasso avillaci at ceibo.fiec.espol.edu.ec
Sat May 17 13:55:14 EDT 2008


Using Fedora Core 8 with Mono repository from opensuse.org for Fedora 8.

Maybe this has been answered before, but could not find any references.

I have this problem with the test ASPX file attached, with the 
Web.config file. The ASPX file has non-ASCII characters (utf-8 encoded) 
as part of the HTML content in the file. When I serve this file with 
mod-mono-server or with xsp2, the characters are displayed correctly. 
If, however, I try to serve it with mod-mono-server2, the characters 
corresponding to the utf-8 encoding are rendered as question marks. I 
have checked with telnet that the server does specify utf-8 as encoding:

[alex at srv64 public_html]$ telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /~alex/TestODBC.aspx HTTP/1.1
Host: localhost
Connection: close

HTTP/1.1 200 OK
Date: Sat, 17 May 2008 16:34:36 GMT
Server: Apache/2.2.8 (Fedora)
Content-Length: 2143
Cache-Control: private
Set-Cookie: ASP.NET_SessionId=011364A41760ECF8497F5AC2; path=/~alex
Connection: close
Content-Type: text/html; charset=utf-8

However, the response itself shows question marks instead of the bytes 
corresponding to the proper encoding:

 <span id="lblPeticion">Petici??n SQL:</span></td>

This should read "Petición" with an accented letter o .

If I had to guess, I would say that the encoding gets garbled by a 
superfluous conversion to ASCIIEncoding after being generated correctly 
as UTF-8.

Could any of you please confirm whether this happens to you?

-- 
perl -e '$x=2.4;print sprintf("%.0f + %.0f = %.0f\n",$x,$x,$x+$x);'

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TestODBC.aspx
Url: http://lists.ximian.com/pipermail/mono-list/attachments/20080517/90b64f07/attachment.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Web.config
Type: text/xml
Size: 275 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20080517/90b64f07/attachment.xml 


More information about the Mono-list mailing list