[Mono-bugs] [Bug 72654][Nor] New - UTF-8 Encoding specified in web.config doesnt work

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 16 Feb 2005 16:34:00 -0500 (EST)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by topace@lightbox.org.


--- shadow/72654	2005-02-16 16:34:00.000000000 -0500
+++ shadow/72654.tmp.15261	2005-02-16 16:34:00.000000000 -0500
@@ -0,0 +1,92 @@
+Bug#: 72654
+Product: Mono: Runtime
+Version: 1.0
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: topace@lightbox.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: UTF-8 Encoding specified in web.config doesnt work
+Mono 1.0.5 
+Mod_mono 1.0.5 
+Apache 2.0.53 
+First, I'll give you a brief synopsis of the files I am using: 
+http://test.lightbox.ca/index.aspx  <- this file basically has some UTF-8  
+Encoded characters (the french "c"), nothing out of the ordinary 
+UTF-8: Fran├žais 
+WINDOWS-1252: Franšais 
+<asp:hyperlink id="frenchlink" style="Z-INDEX: 1; LEFT: 300; POSITION:  
+absolute; TOP: 30" runat="server"  
+and also, my (very stripped down to find the problem) web.config looks 
+<?xml version="1.0" encoding="utf-8" ?> 
+  <system.web> 
+    <compilation  
+         defaultLanguage="c#" 
+         debug="true" 
+    /> 
+          This section sets the globalization settings of the 
+          --> 
+    <globalization  
+            requestEncoding="utf-8"  
+            responseEncoding="utf-8"  
+   /> 
+ </system.web> 
+in this current web.config configuration, you'll notice that the  
+request/response Encodings are set to "utf-8" .. all fine and dandy till 
+you view the page and instead of showing the UTF-8 character, it shows ??  
+Now, if you comment out / remove the <globalization ..... > tag, restart 
+mono, and view the page, the UTF-8 encoded character works perfectly. 
+So, I guess my question is... am I using the <globalization ...> tag 
+wrong? somehow setting the encodings to UTF8 causes it _not_ to work, 
+whereas leaving it 'undefined' (not something i really want to do) allows 
+utf8 to work properly. 
+Feel free to access the above http://test.lightbox.ca/index.aspx  ... i 
+will leave it with the web.config setting the encodings to utf8 so you 
+can see it not work. 
+Any help would be appreciated... and yes, the obvious solution is "dont 
+set the encodings if that works" ... but im just trying to get to the 
+bottom of things, to see WHY its not working :) 
+(ps, the webserver virtualhost sets the defaultcharset to utf8, as per: 
+        AddDefaultCharset UTF-8