Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C Library Reference - <u>synopsis:</u> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Synopsis:
    #include <mbstring.h>
    unsigned int _mbcjmstojis( unsigned int ch );

Description:
    The _mbcjmstojis converts a shift-JIS character set code to a JIS
    character set code.  If the argument is out of range, _mbcjmstojis
    returns 0.  Valid shift-JIS double-byte characters are those in which
    the first byte falls in the range 0x81 through 0x9F or 0xE0 through 0xFC
    and whose second byte falls in the range 0x40 through 0x7E or 0x80
    through 0xFC.  This is summarized in the following diagram.


            [ 1st byte ]    [ 2nd byte ]
             0x81-0x9F       0x40-0xFC
                 or          except 0x7F
             0xE0-0xFC

    Note:  The JIS character set code is a double-byte character set defined
    by JIS, the Japan Industrial Standard Institutes.  Shift-JIS is another
    double-byte character set.  It is defined by Microsoft for personal
    computers and is based on the JIS code.  The first byte and the second
    byte of JIS codes can have values less than 0x80.  Microsoft has
    designed shift-JIS code so that it can be mixed in strings with
    single-byte alphanumeric codes.  Thus the double-byte shift-JIS codes
    are greater than or equal to 0x8140.

    Note:  This function was called  jmstojis in earlier versions.

Returns:
    The _mbcjmstojis function returns zero if the argument is not in the
    range otherwise, the corresponding shift-JIS code is returned.


Example:
    #include <stdio.h>
    #include <mbctype.h>
    #include <mbstring.h>

    void main()
      {
        unsigned short c;

        _setmbcp( 932 );
        c = _mbcjmstojis( 0x8171 );
        printf( "%#6.4x\n", c );
      }

    produces the following:

    0x2152

Classification:
    WATCOM

Systems:
    All
See Also:
    _getmbcp, _mbbtombc, _mbcjistojms, _mbctombb, _ismbbalnum, _ismbbalpha,
    _ismbbgraph, _ismbbkalnum, _ismbbkalpha, _ismbbkana, _ismbbkprint,
    _ismbbkpunct, _ismbblead, _ismbbprint, _ismbbpunct, _ismbbtrail,
    _mbbtombc, _mbcjistojms, _mbctombb, _mbbtype, _setmbcp

See Also: _getmbcp _mbbtombc

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson