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>
    int _ismbcl0( unsigned int ch );

Description:
    The _ismbcl0 function tests if the argument ch is in the set of
    double-byte characters that include Hiragana, Katakana, punctuation
    symbols, graphical symbols, Roman and Cyrillic alphabets, etc.
     Double-byte Kanji characters are not in this set.  These are any
    characters for which the following expression is true:


         0x8140 <= ch <= 0x889E  &&  ch != 0x837F

    The _ismbcl0 function tests if the argument is a valid double-byte
    character (i.e., it checks that the lower byte is not in the ranges 0x00
    - 0x3F, 0x7F, or 0xFD - 0xFF).

    Note:  The Japanese double-byte character set includes Kanji, Hiragana,
    and Katakana characters - both alphabetic and numeric.  Kanji is the
    ideogram character set of the Japanese character set.  Hiragana and
    Katakana are two types of phonetic character sets of the Japanese
    character set.  The Hiragana code set includes 83 characters and the
    Katakana code set includes 86 characters.

Returns:
    The _ismbcl0 function returns a non-zero value when the argument is a
    member of this set of characters; otherwise, zero is returned.


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

    unsigned int chars[] = {
        'A',
        0x8140, /* double-byte space */
        0x8143, /* double-byte , */
        0x8260, /* double-byte A */
        0x829F, /* double-byte Hiragana */
        0x8340, /* double-byte Katakana */
        0x837F, /* illegal double-byte character */
        0x889E, /* double-byte L0 character */
        0x889F, /* double-byte L1 character */
        0x989F, /* double-byte L2 character */
        0xA6    /* single-byte Katakana */
    };

    #define SIZE sizeof( chars ) / sizeof( unsigned int )

    void main()
      {
        int   i;

        _setmbcp( 932 );
        for( i = 0; i < SIZE; i++ ) {
          printf( "%#6.4x is %sa valid "
                "JIS L0 character\n",
                chars[i],
                ( _ismbcl0( chars[i] ) ) ? "" : "not " );
        }
      }

    produces the following:

    0x0041 is not a valid JIS L0 character
    0x8140 is a valid JIS L0 character
    0x8143 is a valid JIS L0 character
    0x8260 is a valid JIS L0 character
    0x829f is a valid JIS L0 character
    0x8340 is a valid JIS L0 character
    0x837f is not a valid JIS L0 character
    0x889e is a valid JIS L0 character
    0x889f is not a valid JIS L0 character
    0x989f is not a valid JIS L0 character
    0x00a6 is not a valid JIS L0 character

Classification:
    WATCOM

Systems:
    DOS, Windows, Win386, Win32, OS/2 1.x(all), OS/2-32

See Also:
    _getmbcp, _ismbcalnum, _ismbcalpha, _ismbccntrl, _ismbcdigit,
    _ismbcgraph, _ismbchira, _ismbckata, _ismbcl1, _ismbcl2, _ismbclegal,
    _ismbclower, _ismbcprint, _ismbcpunct, _ismbcspace, _ismbcsymbol,
    _ismbcupper, _ismbcxdigit, _mbbtype, _setmbcp

See Also: _getmbcp _ismbcalnum

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