Index: globash.rc.in
===================================================================
RCS file: /cvsroot/global/global/globash.rc.in,v
retrieving revision 1.1
diff -u -p -r1.1 globash.rc.in
--- globash.rc.in	27 Oct 2005 06:33:34 -0000	1.1
+++ globash.rc.in	29 Oct 2005 10:17:40 -0000
@@ -477,7 +477,7 @@ __gtags_gen_xref()
 		if [ "$__gtags_lasttag" != "" ]; then
 			case $__gtags_lastcom in
 			f)	sortfilter=cat;;
-			*)	sortfilter='@POSIX_SORT@ -k 1,1 -k 3,3 -k 2,2n';;
+			*)	sortfilter='LC_ALL=C @POSIX_SORT@ -k 1,1 -k 3,3 -k 2,2n';;
 			esac
 			com="global -xn$__gtags_lastcom $__gtags_lasttag | $sortfilter >$XREF"
 			eval $com
Index: global/global.c
===================================================================
RCS file: /cvsroot/global/global/global/global.c,v
retrieving revision 1.112
diff -u -p -r1.112 global.c
--- global/global.c	27 Oct 2005 06:33:34 -0000	1.112
+++ global/global.c	29 Oct 2005 10:17:40 -0000
@@ -450,6 +450,11 @@ main(int argc, char **argv)
 		exit(0);
 	}
 	/*
+	 * Use C locale in order to avoid the degradation of performance
+	 * by internationalized sort command.
+	 */
+	set_env("LC_ALL", "C");
+	/*
 	 * exec lid(id-utils).
 	 */
 	if (Iflag) {
Index: gtags/gtags.c
===================================================================
RCS file: /cvsroot/global/global/gtags/gtags.c,v
retrieving revision 1.148
diff -u -p -r1.148 gtags.c
--- gtags/gtags.c	27 Oct 2005 06:33:35 -0000	1.148
+++ gtags/gtags.c	29 Oct 2005 10:17:40 -0000
@@ -597,6 +597,11 @@ main(int argc, char **argv)
 	if (wflag)
 		set_env("GTAGSWARNING", "1");
 	/*
+	 * Use C locale in order to avoid the degradation of performance
+	 * by internationalized sort command.
+	 */
+	set_env("LC_ALL", "C");
+	/*
 	 * incremental update.
 	 */
 	if (iflag) {
Index: htags/htags.c
===================================================================
RCS file: /cvsroot/global/global/htags/htags.c,v
retrieving revision 1.74
diff -u -p -r1.74 htags.c
--- htags/htags.c	27 Oct 2005 06:33:35 -0000	1.74
+++ htags/htags.c	29 Oct 2005 10:17:41 -0000
@@ -1708,6 +1708,11 @@ main(int argc, char **argv)
 	set_env("GTAGSDBPATH", dbpath);
 	set_env("GTAGSLIBPATH", "");
 	/*
+	 * Use C locale in order to avoid the degradation of performance
+	 * by internationalized sort command.
+	 */
+	set_env("LC_ALL", "C");
+	/*
 	 * check directories
 	 */
 	if (fflag || cflag || dynamic) {
