[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sort-lines including non ASCII
From: |
Óscar Fuentes |
Subject: |
Re: sort-lines including non ASCII |
Date: |
Tue, 05 Jul 2016 23:57:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) |
Uwe Brauer <address@hidden> writes:
> Take the following Spanish example.
>
> Arrieta
> Anton
> Álvarez
>
>
> Using sort-lines *does* not result in
>
> Álvarez
> Anton
> Arrieta
>
> But in
>
> Anton
> Arrieta
> Álvarez
>
> Which is contra intuitive. Does anybody know about a function with such
> a feature? Any plans?
(sort (list "Arrieta" "Antón" "Álvarez") 'string-collate-lessp)
If that doesn't work, check your LOCALE (or LANG) environment variable
(see the docstring of string-collate-lessp for details).
Someting like
(sort (list "Antón" "Arrieta" "Álvarez")
(lambda (a b)
(string-collate-lessp a b "es_ES.UTF-8" t)))
should do the right thing regardless of your environment variables (at
least on GNU/Linux).
- sort-lines including non ASCII, Uwe Brauer, 2016/07/05
- Re: sort-lines including non ASCII,
Óscar Fuentes <=
- Re: sort-lines including non ASCII, Eli Zaretskii, 2016/07/06
- Re: sort-lines including non ASCII, Michael Heerdegen, 2016/07/06
- Re: sort-lines including non ASCII, Uwe Brauer, 2016/07/07
- Re: sort-lines including non ASCII, Eli Zaretskii, 2016/07/07
- Re: sort-lines including non ASCII, Michael Heerdegen, 2016/07/07
- Re: sort-lines including non ASCII, Eli Zaretskii, 2016/07/07
- Re: sort-lines including non ASCII, Michael Heerdegen, 2016/07/07
- Re: sort-lines including non ASCII, Eli Zaretskii, 2016/07/07
- Re: sort-lines including non ASCII, Michael Heerdegen, 2016/07/07