The Domino C API currently only contains a method to convert between LMBCS and other text formats like Unicode that supports WORD buffer sizes (< 64K):
WORD LNPUBLIC OSTranslate(
const char far *In,
char far *Out,
Since LMBCS is a multibyte character set, it's very difficult to translate longer texts with this method. You would need to scan the buffer content to not split multibyte sequences.
LMBCS format details are described here http://icu-project.org/~yoshito/jacoco_57.1/com.ibm.icu.charset/CharsetLMBCS.java.html. We tried to use this Java implementation, but found out that lots of special characters are translated differently between OSTranslate and this class.
There seems to be a method OSTranslate32 in the C API with DWORD length support. Please add that method to the public C API as well.
Another useful thing would be if OSTranslate32 returned the required buffer size when OutLength=0 is passed, like Windows API functions do. This would prevent unnecessary memory allocations.
Karsten Lehmann, Mindoo GmbH