From b40645caa91dad69ba8a14ef53dc0013e12497fc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 2 Dec 2024 12:47:54 -0800 Subject: [PATCH] doc: mention tr issues in multi-byte locales * doc/autoconf.texi (tr): Mention multi-byte issues. --- doc/autoconf.texi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 222647b8..dd0b1fa2 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -19985,6 +19985,14 @@ timestamp truncation problems that @samp{cp -p} has. @item @command{tr} @c --------------- @prindex @command{tr} + +Many @command{tr} implementations do not support multi-byte locales +well. For example, Solaris 10 @command{tr} rejects character classes in +multi-byte locales. Also, ranges have well-defined behavior only in the +@samp{C} (or @samp{POSIX}) locale, so if you cannot guarantee the +setting of @env{LC_ALL} it is better to spell out a range +@samp{[ABCDEFGHIJKLMNOPQRSTUVWXYZ]} than to rely on @samp{[A-Z]}. + @cindex carriage return, deleting @cindex newline, deleting @cindex deleting carriage return