]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
doc: mention tr issues in multi-byte locales
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Dec 2024 20:47:54 +0000 (12:47 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Dec 2024 20:47:54 +0000 (12:47 -0800)
* doc/autoconf.texi (tr): Mention multi-byte issues.

doc/autoconf.texi

index 222647b84bc504b78f30d59f083af40f769f7bb6..dd0b1fa2b4fe424c3ae3959cd2c9fe987ce2c2c5 100644 (file)
@@ -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