.\" Generated by the Allegro makedoc utility .TH need_uconvert 3alleg4 "version 4.4.3" "Allegro" "Allegro manual" .SH NAME need_uconvert \- Tells if a string requires encoding conversion. Allegro game programming library.\& .SH SYNOPSIS .B #include .sp .B int need_uconvert(const char *s, int type, int newtype); .SH DESCRIPTION Given a pointer to a string (`s'), a description of the type of the string (`type'), and the type that you would like this string to be converted into (`newtype'), this function tells you whether any conversion is required. No conversion will be needed if `type' and `newtype' are the same, or if one type is ASCII, the other is UTF-8, and the string contains only character values less than 128. As a convenience shortcut, you can pass the value U_CURRENT as either of the type parameters, to represent whatever text encoding format is currently selected. Example: .nf if (need_uconvert(text, U_UTF8, U_CURRENT)) { /* conversion is required */ } .fi .SH "RETURN VALUE" Returns non-zero if any conversion is required or zero otherwise. .SH SEE ALSO .BR set_uformat (3alleg4), .BR get_uformat (3alleg4), .BR do_uconvert (3alleg4), .BR uconvert (3alleg4)