_mbcjistojms, _mbcjistojms_l, _mbcjmstojis, _mbcjmstojis_l
Converts between Japan Industry Standard (JIS) and Japan Microsoft (JMS) characters.
unsigned int _mbcjistojms( unsigned int c ); unsigned int _mbcjistojms_l( unsigned int c, _locale_t locale ); unsigned int _mbcjmstojis( unsigned int c ); unsigned int _mbcjmstojis_l( unsigned int c, _locale_t locale );
Parameters
- c
-
Character to convert.
- local
-
Locale to use.
The _mbcjistojms function converts a Japan Industry Standard (JIS) character to a Microsoft Kanji (Shift JIS) character. The character is converted only if the lead and trail bytes are in the range 0x21 – 0x7E. If the lead or trial byte is outside this range, errno is set to EILSEQ. For more information about this and other error codes, see errno, _doserrno, _sys_errlist, and _sys_nerr.
The _mbcjmstojis function converts a Shift JIS character to a JIS character. The character is converted only if the lead byte is in the range 0x81 – 0x9F or 0xE0 – 0xFC and the trail byte is in the range 0x40 – 0x7E or 0x80 – 0xFC. Note that some code points in that range do not have a character assigned and so cannot be converted.
The value c should be a 16-bit value whose upper 8 bits represent the lead byte of the character to convert and whose lower 8 bits represent the trail byte.
The output value is affected by the setting of the LC_CTYPE category setting of the locale; see setlocale for more information. The versions of these functions without the _l suffix use the current locale for this locale-dependent behavior; the versions with the _l suffix are identical except that they use the locale parameter passed in instead.
In earlier versions, _mbcjistojms and _mbcjmstojis were called jistojms and jmstojis, respectively. _mbcjistojms, _mbcjistojms_l, _mbcjmstojis and _mbcjmstojis_l should be used instead.
| Routine | Required header | Compatibility |
|---|---|---|
| _mbcjistojms | <mbstring.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _mbcjistojms_l | <mbstring.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _mbcjmstojis | <mbstring.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
| _mbcjmstojis_l | <mbstring.h> | Windows 95, Windows 98, Windows 98 Second Edition, Windows Millennium Edition, Windows NT 4.0, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 |
For more compatibility information, see Compatibility in the Introduction.
Not applicable. To call the standard C function, use PInvoke. For more information, see Platform Invoke Examples.