From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 12008@debbugs.gnu.org
Subject: bug#12008: Alphabetic sorting respect user's language and/or locale
Date: Sun, 22 Jul 2012 06:24:31 -0400 [thread overview]
Message-ID: <jwvtxx0kscs.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <83liid14u0.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 21 Jul 2012 19:01:11 +0300")
> A simple way of doing this goes along the following lines:
> Lisp_Object enc_str1 = ENCODE_SYSTEM (string1);
> Lisp_Object enc_str2 = ENCODE_SYSTEM (string2);
> return make_number (strcoll (enc_str1, enc_str2));
That's probably OK for dired'd sorting but not for sort-subr where we
need to be independent from the system locale. So better would be to
switch the locale to utf-8 and call strcoll without calling
ENCODE_SYSTEM (tho of course, only if the strings are multibyte).
Stefan
next prev parent reply other threads:[~2012-07-22 10:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-21 14:32 bug#12008: Alphabetic sorting respect user's language and/or locale martin rudalics
2012-07-21 16:01 ` Eli Zaretskii
2012-07-21 16:38 ` Eli Zaretskii
2012-07-22 10:24 ` Stefan Monnier [this message]
2012-07-22 15:25 ` Eli Zaretskii
2012-07-23 8:57 ` Stefan Monnier
2012-07-23 15:34 ` Eli Zaretskii
2012-07-23 23:30 ` Stefan Monnier
2012-07-23 9:34 ` martin rudalics
2012-07-23 15:38 ` Eli Zaretskii
2012-07-23 15:49 ` martin rudalics
2012-07-23 15:55 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvtxx0kscs.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=12008@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).