# HG changeset patch # User Markus Mützel # Date 1547894389 -3600 # Node ID 3e7fa894731a354f922906009938c0a9fe1243fd # Parent ad70a85f702b7ace1daf4a21e9a69e180de81025 documentation: Replace ASCII with UTF-8 where it is more correct. * doc/interpreter/string.txi: Octave casts numerical values to UTF-8 instead of ASCII. Add reference to "unicode2native" and "native2unicode" earlier in the manual. * scripts/help/warning_ids.m: Octave casts numerical values to UTF-8 instead of ASCII. diff -r ad70a85f702b -r 3e7fa894731a doc/interpreter/strings.txi --- a/doc/interpreter/strings.txi Fri Jan 18 11:18:23 2019 +0100 +++ b/doc/interpreter/strings.txi Sat Jan 19 11:39:49 2019 +0100 @@ -256,8 +256,9 @@ @itemize @bullet @item All string concatenation functions except @code{cstrcat} -convert numerical input into character data by taking the corresponding ASCII -character for each element, as in the following example: +convert numerical input into character data by taking the corresponding UTF-8 +character for each element (or multi-byte sequence), as in the following +example: @example @group @@ -266,6 +267,10 @@ @end group @end example +For conversion between locale encodings and UTF-8, see +@ref{XREFunicode2native,,unicode2native} and +@ref{XREFnative2unicode,,native2unicode}. + @item @code{char} and @code{strvcat} concatenate vertically, while @code{strcat} and @code{cstrcat} concatenate @@ -363,13 +368,13 @@ @node Converting Numerical Data to Strings @subsection Converting Numerical Data to Strings Apart from the string concatenation functions (@pxref{Concatenating Strings}) -which cast numerical data to the corresponding ASCII characters, there are -several functions that format numerical data as strings. @code{mat2str} and -@code{num2str} convert real or complex matrices, while @code{int2str} converts -integer matrices. @code{int2str} takes the real part of complex values and -round fractional values to integer. A more flexible way to format numerical -data as strings is the @code{sprintf} function (@pxref{Formatted Output}, -@ref{XREFsprintf,,sprintf}). +which cast numerical data to the corresponding UTF-8 encoded characters, there +are several functions that format numerical data as strings. @code{mat2str} +and @code{num2str} convert real or complex matrices, while @code{int2str} +converts integer matrices. @code{int2str} takes the real part of complex +values and round fractional values to integer. A more flexible way to format +numerical data as strings is the @code{sprintf} function +(@pxref{Formatted Output}, @ref{XREFsprintf,,sprintf}). @DOCSTRING(mat2str) diff -r ad70a85f702b -r 3e7fa894731a scripts/help/warning_ids.m --- a/scripts/help/warning_ids.m Fri Jan 18 11:18:23 2019 +0100 +++ b/scripts/help/warning_ids.m Sat Jan 19 11:39:49 2019 +0100 @@ -269,7 +269,7 @@ ## ## @item Octave:num-to-str ## If the @code{Octave:num-to-str} warning is enable, a warning is -## printed for implicit conversions of numbers to their ASCII character +## printed for implicit conversions of numbers to their UTF-8 encoded character ## equivalents when strings are constructed using a mixture of strings and ## numbers in matrix notation. For example, ## @@ -344,8 +344,8 @@ ## ## @item Octave:str-to-num ## If the @code{Octave:str-to-num} warning is enabled, a warning is printed -## for implicit conversions of strings to their numeric ASCII equivalents. -## For example, +## for implicit conversions of strings to their numeric UTF-8 encoded byte +## sequences. For example, ## ## @example ## @group