librdf_utf8_to_latin1

Name

librdf_utf8_to_latin1 --  Convert a UTF-8 string to ISO Latin-1

Synopsis

byte* librdf_utf8_to_latin1 (const byte * input, int length, int * output_length);

Arguments

input

UTF-8 string buffer

length

buffer size

output_length

Pointer to variable to store resulting string length or NULL

Description

Converts the given UTF-8 string to the ISO Latin-1 subset of Unicode (characters 0x00-0xff), discarding any out of range characters.

If the output_length pointer is not NULL, the returned string length will be stored there.

Return value

pointer to new ISO Latin-1 string or NULL on failure