]> Savannah Git Hosting - gnulib.git/commitdiff
doc: Corrections to the "Strings and Characters" chapter.
authorBruno Haible <bruno@clisp.org>
Mon, 19 Jun 2023 17:23:51 +0000 (19:23 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 19 Jun 2023 17:23:51 +0000 (19:23 +0200)
Suggested by Paul Eggert.

* doc/strings.texi: Corrections: GB18030 is rarely used nowadays.
<ctype.h> functions can be useful for specific data.

ChangeLog
doc/strings.texi

index 243a1c859ff067261ccc9f9b0a92d26e4a51c32e..d3e4efcf285f35f27ee42ff4564da66e294de784 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-06-19  Bruno Haible  <bruno@clisp.org>
+
+       doc: Corrections to the "Strings and Characters" chapter.
+       Suggested by Paul Eggert.
+       * doc/strings.texi: Corrections: GB18030 is rarely used nowadays.
+       <ctype.h> functions can be useful for specific data.
+
 2023-06-19  Bruno Haible  <bruno@clisp.org>
 
        doc: Use "spaced en dash" style instead of "spaced em dash" style.
index 131221f58361d1abbfe4aa8d56a7afd39076fc5c..cbed6533c4ab6840a3104930a328fb944a8c8499 100644 (file)
@@ -76,7 +76,7 @@ When every character is represented by only 1 byte, we speak of an
 ``unibyte locale'', otherwise of a ``multibyte locale''.
 
 It is important to realize that the majority of Unix installations
-nowadays use UTF-8 or GB18030 as locale encoding; therefore, the
+nowadays use UTF-8 as locale encoding; therefore, the
 majority of users are using multibyte locales.
 
 Three important facts to remember are:
@@ -89,8 +89,8 @@ As a consequence:
 @itemize @bullet
 @item
 The @posixheader{ctype.h} API, that was designed only with unibyte
-encodings in mind, is useless nowadays; it does not work in
-multibyte locales.
+encodings in mind, is useless nowadays for general text processing; it
+does not work in multibyte locales.
 @item
 The @posixfunc{strlen} function does not return the number of characters
 in a string.  Nor does it return the number of screen columns occupied
@@ -107,9 +107,9 @@ represented by a hollow box.
 @emph{Multibyte does not imply UTF-8 encoding.}
 @end cartouche
 
-While UTF-8 is the most common multibyte encoding, GB18030 is there as
-well and will not go away within decades, because it is a Chinese
-government standard, last revised in 2022.
+While UTF-8 is the most common multibyte encoding, GB18030 is also a
+supported locale encoding on GNU systems (mostly because it is a Chinese
+government standard, last revised in 2022).
 
 @cartouche
 @emph{Searching for a character in a string is not the same as searching
@@ -184,7 +184,7 @@ Gnulib also has additional API.
 @node Iterating through strings
 @subsubsection Iterating through strings
 
-For complex string processing, the provided strings functions may not be
+For complex string processing, the provided string functions may not be
 enough, and what you need is a way to iterate through a string while
 processing each (possibly multibyte) character in turn.  Gnulib provides
 two modules for this purpose.  Both iterate through the string in
@@ -604,7 +604,8 @@ locales nowadays are multibyte locales, it makes no sense to write a
 program that runs only in unibyte locales.
 
 ISO C and POSIX standardized an API for characters of type @code{char},
-in @code{<ctype.h>}.  This API is nowadays useless and obsolete.
+in @code{<ctype.h>}.  This API is nowadays useless and obsolete, when it
+comes to general text processing.
 
 The important lessons to remember are: