ConvertShiftJIS2ASCII
Converts a Shift-JIS string to ASCII.
Synopsis
int32 ConvertShiftJIS2ASCII(const char *string,char *result, uint32 resultSize,uint8 unknownFiller);
Description
Converts a string from Shift-JIS to ASCII. The conversion is done as well as possible. If certain characters from the source string cannot be represented in ASCII, the unknownFiller byte will be inserted in the result buffer in their place.
Arguments
- string
- The string to convert.
- result
- A memory buffer where the result of the conversion can be put.
- resultSize
- The number of bytes available in the result buffer. This limits the number of bytes that are put into the buffer.
- unknownFiller
- If a character sequence cannot be adequately converted, then this byte will be put into the result buffer in place of the character sequence.
Return Value
If positive, then the number of characters in the result buffer. If negative, then an error code.
- > = 0
- Number of characters in the result buffer.
- JSTR_ERR_BUFFERTOO
- SMALL
- There was not enough room in the result buffer.
Implementation
Folio call implemented in jstring folio V24.
Associated Files
jstring.h