[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.

http://bugzilla.ximian.com/show_bug.cgi?id=72654

--- 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: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: topace@lightbox.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+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 
+ 
+------------------index.aspx--------------------- 
+<html><body> 
+<br> 
+UTF-8: Français 
+<br> 
+WINDOWS-1252: Français 
+<br> 
+ 
+<asp:hyperlink id="frenchlink" style="Z-INDEX: 1; LEFT: 300; POSITION:  
+absolute; TOP: 30" runat="server"  
+NavigateUrl="index.aspx">Français</asp:hyperlink> 
+</body> 
+</html> 
+------------------------------------------------- 
+ 
+and also, my (very stripped down to find the problem) web.config looks 
+like  
+this: 
+ 
+---------------web.config-------------------------- 
+<?xml version="1.0" encoding="utf-8" ?> 
+<configuration> 
+  <system.web> 
+    <compilation  
+         defaultLanguage="c#" 
+         debug="true" 
+    /> 
+ 
+    <!-- GLOBALIZATION 
+          This section sets the globalization settings of the 
+application.  
+          --> 
+    <globalization  
+            requestEncoding="utf-8"  
+            responseEncoding="utf-8"  
+   /> 
+ 
+ </system.web> 
+</configuration> 
+-------------------------------------------------- 
+ 
+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 ??  
+instead. 
+ 
+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 
+)