[Mono-bugs] [Bug 79607][Nor] New - remove use of g_strdown

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Oct 6 17:31:31 EDT 2006

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 miguel at ximian.com.


--- shadow/79607	2006-10-06 17:31:31.000000000 -0400
+++ shadow/79607.tmp.14023	2006-10-06 17:31:31.000000000 -0400
@@ -0,0 +1,40 @@
+Bug#: 79607
+Product: Mono: Runtime
+Version: 1.1
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: miguel at ximian.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: remove use of g_strdown
+We have a few uses of g_strdown in the source code for Mono, but this
+routine has been deprecated in glib for the following reasons:
+g_strdown has been deprecated sinceg_strdown has been deprecated since
+version 2.2 and should not be used in newly-written code. This function is
+totally broken for the reasons discussed in the g_strncasecmp() docs - use
+g_ascii_strdown() or g_utf8_strdown() instead.
+And g_strncasecmp says:
+ version 2.2 and should not be used in newly-written code. The problem with
+g_strncasecmp() is that it does the comparison by calling
+toupper()/tolower(). These functions are locale-specific and operate on
+single bytes. However, it is impossible to handle things correctly from an
+I18N standpoint by operating on bytes, since characters may be multibyte.
+Thus g_strncasecmp() is broken if your string is guaranteed to be ASCII,
+since it's locale-sensitive, and it's broken if your string is localized,
+since it doesn't work on many encodings at all, including UTF-8, EUC-JP, etc.
+Our use is fairly minimal, but we should still fix it.
+Notice that eglib has no support for the alternatives at this point

More information about the mono-bugs mailing list