Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Sep 1999 02:54:31 +0200 (CEST)
From:      girgen@partitur.se
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/13928: Patch for Swedish LC_COLLATE
Message-ID:  <199909240054.CAA40997@stordatan.telia.com>

next in thread | raw e-mail | index | archive | help

>Number:         13928
>Category:       bin
>Synopsis:       Patch for Swedish LC_COLLATE
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 23 18:00:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Palle Girgensohn
>Release:        FreeBSD 3.3-STABLE i386
>Organization:
Partitur
>Environment:
Tested with most FreeBSD-3-RELENGs
sort and postgresql used for application testing
	

>Description:
Swedish sorting order is completey wrong in all versions of FreeBSD up
till today. This patch tries to fix this.

I say _tries_ because a truly correct sorting order in Swedish would
sort 'V' and 'W' interchangebly, i.e. Waldemar and Valdemar has the
same 'value', and Waldamar will sort before Valdemar. Same goes for
Norwegian '<ae>' and '<o/>', which probably should together with <a:>
and <o:> respectively.

I've tried enclosing the character groups in both () and {}, the
latter which somewhat cryptically is stated in the manual to give the
characters the same primary value only. The act the same, though :(

Apart from these drawbacks, this patch is rather important for Swedish
users who want to use the FreeBSD platform with for example
databases. They are expected to sort correctly, but they don't.

Please commit this patch. :-)
	

>How-To-Repeat:
How to test it:

- patch
- rebuild world (or relevant parts thereof [which aren't just colldef])
- export LC_COLLATE=sv_SE.ISO_8859-1

cat | sort
Adam
Ådaa
Odem
Öde
Äta
Att
^D

You should get:
Adam
Att
Odem
Ådaa
Äta
Öde

	

>Fix:
--- usr.bin/colldef/data/Makefile.orig	Tue Jul 20 19:50:52 1999
+++ usr.bin/colldef/data/Makefile	Sat Aug  7 04:20:14 1999
@@ -14,7 +14,9 @@
 		lt_LN.ISO_8859-1 \
 		lt_LN.ISO_8859-2 \
 		ru_SU.CP866 \
-		ru_SU.KOI8-R
+		ru_SU.KOI8-R \
+		sv_SE.DIS_8859-15 \
+		sv_SE.ISO_8859-1
 
 LOCALEDIR=      ${DESTDIR}/usr/share/locale
 
@@ -26,7 +28,7 @@
 LATIN1LINKS = \
 	da_DK en_AU en_CA en_GB en_US fi_FI \
 	fr_BE fr_CA fr_CH fr_FR it_CH it_IT nl_BE nl_NL no_NO \
-	pt_PT sv_SE
+	pt_PT
 
 LATIN2LINKS = hr_HR hu_HU pl_PL sl_SI
 
@@ -51,6 +53,8 @@
 lt_LN.ISO_8859-2.out:   map.ISO_8859-2
 ru_SU.CP866.out:        map.CP866
 ru_SU.KOI8-R.out:       map.KOI8-R
+sv_SE.DIS_8859-15.out:  map.DIS_8859-15
+sv_SE.ISO_8859-1.out:   map.ISO_8859-1
 
 afterinstall:
 .for locale in ${LOCALES}
--- /dev/null	Sat Aug  7 04:17:30 1999
+++ usr.bin/colldef/data/sv_SE.ISO_8859-1.src	Sat Aug  7 04:20:14 1999
@@ -0,0 +1,40 @@
+# Swedish/ISO 8859-1 (backward compatible with ASCII)
+#
+# (Based on the German de_DE.ISO_8859-1)
+#
+# $Id: $
+#
+charmap map.ISO_8859-1
+order \
+# controls
+	<NU>;...;<US>;<PA>;...;<AC>;\
+#
+	<NS>;<SP>;!;<!I>;\";<<<>;</>/>>;<Nb>;\
+	<Cu>;<Ct>;<DO>;<Pd>;<Ye>;\
+	%;&;<',>;';\(;\);*;+;<+->;<-:>;<*X>;\,;<-->;-;.;/;\
+# digits
+	(0,<14>,<12>,<34>);(1,<1S>);(2,<2S>);(3,<3S>);4;...;9;\
+#
+	:;\;;\<;=;>;?;<?I>;<SE>;<PI>;<Co>;<Rg>;<At>;\
+# capital
+	(A,<A'>,<A!>,<A/>>,<A?>);\
+	B;(C,<C,>);(D,<D->);(E,<E'>,<E!>,<E/>>,<E:>);\
+	F;G;H;(I,<I'>,<I!>,<I/>>,<I:>);\
+	J;...;M;(N,<N?>);(O,<O'>,<O!>,<O?>,<O/>>);\
+	P;...;T;(U,<U'>,<U!>,<U/>>,<U:>);\
+	(V,W);X;(Y,<Y'>);Z;<AA>;(<A:>,<AE>);(<O:>,<O//>);\
+	<TH>;\
+#
+	[;\\;];^;<':>;_;<'m>;<''>;`;\
+# small
+	(a,<a'>,<a!>,<a/>>,<a?>);\
+	b;(c,<c,>);(d,<d->);(e,<e'>,<e!>,<e/>>,<e:>);\
+	f;g;h;(i,<i'>,<i!>,<i/>>,<i:>);\
+	j;...;m;(n,<n?>);(o,<o'>,<o!>,<o?>,<o/>>);\
+	p;...;t;(u,<u'>,<u!>,<u/>>,<u:>);\
+	(v,w);x;(y,<y'>,<y:>);z;<aa>;(<a:>,<ae>);(<o:>,<o//>);\
+	<th>;\
+#
+	\{;<NO>;|;<BB>;\};~;<.M>;<DG>;<My>;<DT>;\
+# remains
+	<-a>;<ss>;<-o>
--- /dev/null	Sat Aug  7 04:17:30 1999
+++ usr.bin/colldef/data/sv_SE.DIS_8859-15.src	Sat Aug  7 04:20:14 1999
@@ -0,0 +1,40 @@
+# Swedish/DIS 8859-15 (backward compatible with ASCII)
+#
+# (Based on the German de_DE.DIS_8859-15)
+#
+# $Id: $
+#
+charmap map.DIS_8859-15
+order \
+# controls
+	<NU>;...;<US>;<PA>;...;<AC>;\
+#
+	<NS>;<SP>;!;<!I>;\";<<<>;</>/>>;<Nb>;\
+	<Eu>;<Ct>;<DO>;<Pd>;<Ye>;\
+	%;&;';\(;\);*;+;<+->;<-:>;<*X>;\,;<-->;-;.;/;\
+# digits
+	0;(1,<1S>);(2,<2S>);(3,<3S>);4;...;9;\
+#
+	:;\;;\<;=;>;?;<?I>;<SE>;<PI>;<Co>;<Rg>;<At>;\
+# capital
+	(A,<A'>,<A!>,<A/>>,<A?>);\
+	B;(C,<C,>);(D,<D->);(E,<E'>,<E!>,<E/>>,<E:>);\
+	F;G;H;(I,<I'>,<I!>,<I/>>,<I:>);\
+	J;...;M;(N,<N?>);(O,<O'>,<O!>,<O?>,<O/>>,<OE>);\
+	P;Q;R;(S,<S<>);T;(U,<U'>,<U!>,<U/>>,<U:>);\
+	(V,W);X;(Y,<Y'>,<Y:>);(Z,<Z<>);<AA>;(<A:>,<AE>);(<O:>,<O//>);\
+	<TH>;\
+#
+	[;\\;];^;_;<'m>;`;\
+# small
+	(a,<a'>,<a!>,<a/>>,<a?>);\
+	b;(c,<c,>);(d,<d->);(e,<e'>,<e!>,<e/>>,<e:>);\
+	f;g;h;(i,<i'>,<i!>,<i/>>,<i:>);\
+	j;...;m;(n,<n?>);(o,<o'>,<o!>,<o?>,<o/>>,<oe>);\
+	p;q;r;(s,<s<>,<ss>);t;(u,<u'>,<u!>,<u/>>,<u:>);\
+	(v,w);x;(y,<y'>,<y:>);(z,<z<>);<aa>;(<a:>,<ae>);(<o:>,<o//>);\
+	<th>;\
+#
+	\{;<NO>;|;\};~;<.M>;<DG>;<My>;<DT>;\
+# remains
+	<-a>;<-o>

>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909240054.CAA40997>