Home |
Function RTFSetDefaultOpenFlags Function RTFSetCriticalErrorHandler Function RTFDefaultCriticalErrorHandler Function RTFCharToUnicode |
Function RTFCharToUnicodeRTFCharToUnicode translates an ASCII string (for example, a file name) to Unicode: int RTFCharToUnicode(UINT CodePage, const char * Src, wchar_t * Dest, UINT MaxLength); ParametersCodePageCode page identifier used to interpret the source string. Use value 65001 for UTF-8 and 0 for the current default code page set through the last call to RTFSetCodePage or RTFSetCodePageUTF8. SrcPointer to a NUL-terminated string to translate. DestPointer to a buffer to receive the translated string. MaxLengthSize in bytes of the buffer pointed to by Dest. return valueIf RTFCharToUnicode succeeds, it returns the number of bytes written to *Dest, including the terminating NUL value. On failure, a negative error code is returned. This function always accepts code page 437 and 65001 (UTF-8). Code page 1252 is only accepted if function RTFSetCodePageANSI has previously been called. RTFSetCodePageANSI does not need to be the last call to RTFSetCodePage. RTFSetCodePage will cache code page 1252. Other code pages are only accepted if they are the current default code page (i.e. the last call to RTFSetCodePage specified the respective code page).
|