From: Yuri Khan <yuri.v.khan@gmail.com>
To: Dmitry Antipov <dmantipov@yandex.ru>
Cc: Eli Zaretskii <eliz@gnu.org>, Paul Eggert <eggert@cs.ucla.edu>,
Emacs developers <emacs-devel@gnu.org>
Subject: Re: One more string functions change
Date: Sun, 29 Jun 2014 00:26:19 +0700 [thread overview]
Message-ID: <CAP_d_8VdzQtekgagnZwYLpRceNyfGPW-ftxAZm+RmM_Gff0z1w@mail.gmail.com> (raw)
In-Reply-To: <53AEEBA3.1030706@yandex.ru>
On Sat, Jun 28, 2014 at 11:21 PM, Dmitry Antipov <dmantipov@yandex.ru> wrote:
> What's wrong with case tables? If we're talking about Unicode only,
> is it enough/possible/desirable to have just one (huge) case table
> for all supported characters?
It’s not generally possible, because in Turkic locales there is this
funny couple of letters, i and dotless ı. They uppercase into dotted İ
and I, respectively. This makes uppercase a function dependent on the
locale.
Further, comparing strings case-insensitively by downcasing is wrong,
because of this funny German letter ß (sharp s, eszett), and these
funny Greek letters σ (sigma) and ς (final sigma). Straße is
case-insensitively equivalent to STRASSE, but they downcase to straße
and strasse, respectively. Both sigma σ and final sigma ς are
case-insensitively equivalent to Capital Sigma Σ, but small letters
downcase to themselves and Capital Sigma downcases to σ.
The right, Unicode-compliant way to compare strings case-insensitively
involves a mapping called case folding, which is similar to
downcasing, but subtly different. For example, it expands ß into ss,
and normalizes final sigma to normal sigma, and does many other
expansions. Case-folded strings are largely not usable for human
consumption but only for case-insensitive comparison. Details can be
found in the Unicode Standard, section 5.18.
next prev parent reply other threads:[~2014-06-28 17:26 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 15:27 One more string functions change Dmitry Antipov
2014-06-27 15:35 ` Andreas Schwab
2014-06-27 16:46 ` Paul Eggert
2014-06-27 19:46 ` Eli Zaretskii
2014-06-27 20:46 ` Paul Eggert
2014-06-27 20:53 ` Eli Zaretskii
2014-06-28 16:21 ` Dmitry Antipov
2014-06-28 17:19 ` Eli Zaretskii
2014-06-29 2:53 ` Dmitry Antipov
2014-06-29 15:13 ` Eli Zaretskii
2014-06-29 16:38 ` Dmitry Antipov
2014-06-29 16:48 ` Eli Zaretskii
2014-06-30 6:21 ` Internationalize Emacs's messages [Was: Re: One more string functions change] Dmitry Antipov
2014-06-28 17:26 ` Yuri Khan [this message]
2014-06-27 22:46 ` One more string functions change Drew Adams
2014-06-28 3:48 ` Dmitry Antipov
2014-06-28 13:48 ` Drew Adams
2014-06-28 16:32 ` Dmitry Antipov
2014-06-30 13:18 ` Stefan Monnier
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAP_d_8VdzQtekgagnZwYLpRceNyfGPW-ftxAZm+RmM_Gff0z1w@mail.gmail.com \
--to=yuri.v.khan@gmail.com \
--cc=dmantipov@yandex.ru \
--cc=eggert@cs.ucla.edu \
--cc=eliz@gnu.org \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.