36 lines
815 B
C
36 lines
815 B
C
|
#include <stdio.h>
|
||
|
#include <mbctype.h>
|
||
|
#include <mbstring.h>
|
||
|
|
||
|
unsigned int chars[] = {
|
||
|
'.',
|
||
|
' ',
|
||
|
'1',
|
||
|
'A',
|
||
|
0x8140, /* double-byte space */
|
||
|
0x8143, /* double-byte , */
|
||
|
0x8254, /* double-byte 5 */
|
||
|
0x8260, /* double-byte A */
|
||
|
0x8279, /* double-byte Z */
|
||
|
0x8281, /* double-byte a */
|
||
|
0x829A, /* double-byte z */
|
||
|
0x989F, /* double-byte L2 character */
|
||
|
0xA1, /* single-byte Katakana punctuation */
|
||
|
0xA6 /* single-byte Katakana alphabetic */
|
||
|
};
|
||
|
|
||
|
#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 punctuation character\n",
|
||
|
chars[i],
|
||
|
( _ismbcpunct( chars[i] ) ) ? "" : "not " );
|
||
|
}
|
||
|
}
|