After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 55837 - GTK uses locale-specific functions in places where it needs locale-independent ones
GTK uses locale-specific functions in places where it needs locale-independen...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Backend: Win32
1.3.x
Other Linux
: Normal normal
: Small fix
Assigned To: gtk-bugs
gtk-bugs
Depends on: 54166 55836
Blocks:
 
 
Reported: 2001-06-06 18:38 UTC by Darin Adler
Modified: 2013-03-28 09:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to use locale-independent calls (28.49 KB, patch)
2001-06-06 18:40 UTC, Darin Adler
none Details | Review
patch with a few mistakes corrected (27.09 KB, patch)
2001-06-06 19:08 UTC, Darin Adler
needs-work Details | Review

Description Darin Adler 2001-06-06 18:38:50 UTC
This is basically a placeholder for a patch that makes GTK use ASCII or
UTF-8 routines instead of ones that use the locale-specific character set.
Comment 1 Darin Adler 2001-06-06 18:40:29 UTC
Created attachment 619 [details] [review]
patch to use locale-independent calls
Comment 2 Darin Adler 2001-06-06 18:42:28 UTC
One thing is probably wrong in the patch. It uses g_utf8_strcasecmp
and probably we want to use a call more like g_utf8_strcoll.
Comment 3 Darin Adler 2001-06-06 19:01:31 UTC
Oops. Please ignore the Makefile.am change that crept in there.
Comment 4 Darin Adler 2001-06-06 19:08:15 UTC
Created attachment 620 [details] [review]
patch with a few mistakes corrected
Comment 5 Owen Taylor 2002-02-27 17:07:28 UTC
I've applied the gdk/x11/ parts, and the gtk/ parts that
aren't specific to Win32. (I haven't touched the gtkfilesel.c
parts or the fnmatch.c parts.) I'm assiging this to the win32
component. Once we are happy with the fixes there, it should
be moved along to the linux-fb component.

Wed Feb 27 11:59:05 2002  Owen Taylor  <otaylor@redhat.com>

	Some ASCII vs. locale fixes from Darin Adler (#55837)

	* gtk/gtkcombo.c (gtk_combo_find): Implement real
	case-insensitive comparison using g_utf8_casefold().

	* gtk/gtkaccellabel.c (gtk_accel_label_refetch): Fix
	assignment of gunichar to char by replacing g_unichar_totitle
	with g_ascii_toupper ... the contents would only be ascii
	here anyways.

	* gdk/x11/gdkim-x11.c (_gdk_x11_initialize_locale) 
	* gtk/gtkfontsel.c (gtk_font_selection_show_available_fonts): 
	Replace a calls to g_strcasecmp() with g_ascii_strcasecmp().
Comment 6 Tor Lillqvist 2002-02-27 21:20:33 UTC
I don't see the point in changing strncasecmp to g_ascii_strncasecmp 
in contexts where one of the strings is a string literal? (Most of 
the diff is for contexts like that.)

(bdfcursor.c is an auxiliary program that was run once and probably 
never again, as it isn't very likely that the X11 cursor.bdf file 
going to change. I note now that bdfcursor.c is erroneously included 
in libgdk_win32_la_SOURCES... It should be a separate noninstalled 
program, or even just in EXTRA_DIST.)
Comment 7 Darin Adler 2002-02-28 01:51:29 UTC
Why not? Couldn't strncasecmp return true in some cases where the
non-ASCII character is a cased version of the ASCII character?

I don't think we ever want to call strncasecmp.
Comment 8 Owen Taylor 2002-03-20 21:57:58 UTC
Putting win32 bugs on 2.2.0 milestone, since we don't plan on having win32
official for the 2.0.x branch.
Comment 9 Matthias Clasen 2002-12-23 23:04:46 UTC
Move remaining 2.2.0 bugs to 2.2.1.
Comment 10 Matthias Clasen 2003-06-10 09:57:49 UTC
Move remaining bugs off 2.2.2 target milestone.
Comment 11 Matthias Clasen 2003-08-27 08:06:00 UTC
Move remaining bugs off the 2.2.3 milestone
Comment 12 Tor Lillqvist 2004-12-14 08:22:23 UTC
> Couldn't strncasecmp return true in some cases where the
> non-ASCII character is a cased version of the ASCII character?

Show us an example... Until then closing as NOTABUG.
Comment 13 Darin Adler 2004-12-14 14:59:39 UTC
Seems wrong to close this because *most* of the diff is for changes that aren't necessary. I'd 
understand if *all* of the diff was. In any case, I'm not following the GNOME project very closely these 
days, so if you think these changes aren't needed, that's fine with me.

An example where strncasecmp would return true, by the way, would be if you compared an uppercase 
Turkish "I" with the dot with a lowercase "i" in a Turkish locale. The Turkish "I" with dot is a non-ASCII 
character, and the lowercase "i" is an ASCII character.

I'll reopen one more time just so you read this message, then feel free to do whatever you like with the 
bug.
Comment 14 Philip Withnall 2007-05-26 14:34:58 UTC
Patch doesn't apply cleanly; it seems some of the changes have been made already. It could be reviewed quite quickly.

(Working on http://mail.gnome.org/archives/gtk-devel-list/2007-March/msg00148.html)
Comment 15 Tor Lillqvist 2007-05-26 16:32:34 UTC
I really have a hard time believing there would be anything relevant left in the patch.

Comment 16 Murray Cumming 2013-03-28 09:40:35 UTC
Closing then.