utf8_ToStringTarget

Convert an UTF-8 string into the best possible representation as a STRING. The representation of characters not in STRING is not specified; it may be as pseudo-escape sequences \x{ABCD}, or it may be in some other form of approximation.

static
string
utf8_ToStringTarget
(
string str
)

Parameters

str string

a UTF-8 string

Return Value

Type: string

the newly allocated string, or NULL if the conversion failed. (It should not fail for any properly formed UTF-8 string.)

Meta