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/ismbcaln.c

38 lines
921 B
C
Raw Normal View History

#include <stdio.h>
#include <mbctype.h>
#include <mbstring.h>
unsigned int chars[] = {
'.',
'1',
'A',
0x8143, /* double-byte , */
0x8254, /* double-byte 5 */
0x8260, /* double-byte A */
0x8279, /* double-byte Z */
0x8281, /* double-byte a */
0x829A, /* double-byte z */
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 "
"multibyte alphanumeric character\n",
chars[i],
( _ismbcalnum( chars[i] ) ) ? "" : "not " );
}
}