[Mono-bugs] [Bug 69524][Maj] New - system.web/globalization settings from web.config are ignored.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 15 Nov 2004 17:29:30 -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 jaak@zd.com.pl.

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

--- shadow/69524	2004-11-15 17:29:30.000000000 -0500
+++ shadow/69524.tmp.19354	2004-11-15 17:29:30.000000000 -0500
@@ -0,0 +1,83 @@
+Bug#: 69524
+Product: Mono: Class Libraries
+Version: 1.0
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Major
+Component: Sys.Web
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: jaak@zd.com.pl               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: system.web/globalization settings from web.config are ignored.
+
+I have this web.config file:
+
+<?xml version="1.0" encoding="utf-8"?>
+<configuration>
+    <system.web>
+        <globalization
+            culture="pl-PL"
+            uiCulture="pl-PL"
+            requestEncoding="utf-8"
+            responseEncoding="utf8"
+            fileEncoding="windows-1250" />
+    </system.web>
+</configuration>
+
+The following sample page:
+==========================
+<%@ Page language="c#" AutoEventWireup="true" %>
+<script language="C#" runat="server">
+void Page_Load(object sender, EventArgs args)
+{
+    Response.Write(Response.ContentEncoding + "<br>");
+    Response.Write(Request.ContentEncoding + "<br>");
+    Response.Write(System.Threading.Thread.CurrentThread.CurrentCulture +
+"<br>");
+    Response.Write(System.Threading.Thread.CurrentThread.CurrentUICulture +
+"<br>");
+}
+</script>
+============
+
+Produces:
+
+System.Text.Latin1Encoding
+System.Text.Latin1Encoding
+en-US
+en-US
+
+When I modify the @Page directive to read:
+
+=========
+<%@ Page language="c#" AutoEventWireup="true" UICulture="pl-PL"
+Culture="pl-PL" ResponseEncoding="utf-8" %>
+=========
+
+I get:
+
+=========
+System.Text.UTF8Encoding
+System.Text.Latin1Encoding
+pl-PL
+pl-PL
+=========
+
+This suggests that the system.web/globalization settings are somehow
+ignored and I have to specify everything manually. This is a major problem
+for me, because having written a multilingual application it's not possible
+to have a single place where cultures and encodings can be configured.
+
+On .NET 1.1 I can set both encodings and cultures to anything that's
+available on my machine.
+
+Note that when I enter some garbage values in the <globalization> element,
+no error is ever returned. machine.config has all encodings set to "utf-8".
+
+OS: Fedora Core 2, Mono SVN HEAD, Apache + mod_mono from SVN HEAD