This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/clibexam/ismbbkan.c

33 lines
748 B
C
Raw Normal View History

#include <stdio.h>
#include <mbctype.h>
unsigned int chars[] = {
' ',
'.',
'1',
'A',
0x8140, /* double-byte space */
0x8260, /* double-byte A */
0x82A6, /* double-byte Hiragana */
0x8342, /* double-byte Katakana */
0xA1, /* single-byte Katakana punctuation */
0xA6, /* single-byte Katakana alphabetic */
0xDF, /* single-byte Katakana alphabetic */
0xE0A1 /* double-byte Kanji */
};
#define SIZE sizeof( chars ) / sizeof( unsigned int )
void main()
{
int i;
_setmbcp( 932 );
for( i = 0; i < SIZE; i++ ) {
printf( "%#6.4x is %sa single-byte "
"Katakana character\n",
chars[i],
( _ismbbkana( chars[i] ) ) ? "" : "not " );
}
}