From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96078619210712.tru64-unix-managers.marc@archive.invalid> From: "I'm not a real doofus, but I play one at a national laboratory." Date: Wed, 26 Nov 1997 17:31:46 +0000 To: tru64-unix-managers Subject: sort problems with 8-bit ISO8859 characters X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96078619210712 I'm having a problem with sort and 8-bit characters. I'd like to sort some words and phrases, in dictionary order. It seems that not all of the sort options are handling the locale properly? I apologize if the 8-bit chars in the following text don't come through the mail nicely. Given the following sample list (just for demonstration purposes -- not necessarily real spellings!): emezzxy Einbahnstra=DFe (German scharfes-S) m=E2=F1ana (a with caret, n with tilde) "Man" ma=F1 (n with tilde) mango ma=F1ana (n with tilde) lack a Batwoman =C9meute (E with accent acute) l'hopital gown L'hospital gown L'h=F4pital g=F4wn (o's with carets) If I set my locale to en_US.ISO8859-1, the command 'sort -f' gives: "Man" Einbahnstra=DFe =C9meute emezzxy l'hopital gown L'h=F4pital g=F4wn L'hospital gown lack a Batwoman ma=F1 ma=F1ana m=E2=F1ana mango This is very nearly right. But if I add other qualifiers, things get ugly. For example, the command 'sort -fd' gives: Einbahnstra=DFe emezzxy lack a Batwoman l'hopital gown L'hospital gown L'h=F4pital g=F4wn ma=F1 ma=F1ana "Man" m=E2=F1ana mango =C9meute The =E2, =F4 and =C9 are wrong, but the =F1 is right. The quotes around "Man" and the apostrophes are properly ignored. 'sort -fdi' gives: "Man" Einbahnstra=DFe emezzxy l'hopital gown L'hospital gown L'h=F4pital g=F4wn lack a Batwoman ma=F1 ma=F1ana m=E2=F1ana mango =C9meute This variation screws up the quotes and apostrophes, still has the =C9 wrong, but fixes =E2 and =F4. Using other locales (I've tried fr_FR.ISO8859-1 and de_DE.ISO8859-1) makes no difference. Am I missing something? I'm running DU 4.0B with jumbo kit 4. TIA! Cheers, Wayne http://www-oss.fnal.gov/~baisley