fabien van mook

all packages "fvm-*"

package "fvm-miscellaneous"

function file "utf8_to_uint32.m"

Function k = utf8_to_uint32(u)

converts bytes in the utf-8 encoding to unicode code
points.

A unicode code point is an unsigned integer of 32-bits.
It is represented by one or more 8-bit bytes in the utf-8
encoding. Bytes in the utf-8 encoding are the ordinary way
to represent characters in Octave.

The input argument is a character row vector or a
cell-array of character row vectors. The output argument
is a row vector of unsigned 32-bit integers or a
cell-array of such row vectors, respectively.

Character matrices are not accepted here. They are not
recommended, because the (dis-)assembly of character
matrices is complicated by padding characters (or bytes)
which are needed due to the varying number of bytes by
which each single character may be encoded.

The function internally calls the following non-standard
m-file:
-- unicodelength.m


(c) 2026 fabien van mook

2026.08.20 release of this file within package "fvm-miscellaneous" under GNU GPLv3+