29 lines
471 B
C
29 lines
471 B
C
|
#include <stdio.h>
|
||
|
#include <mbctype.h>
|
||
|
#include <mbstring.h>
|
||
|
|
||
|
unsigned char mb1[2] = {
|
||
|
0x81, 0x43
|
||
|
};
|
||
|
|
||
|
unsigned char mb2[2] = {
|
||
|
0x81, 0x42
|
||
|
};
|
||
|
|
||
|
void main()
|
||
|
{
|
||
|
int i;
|
||
|
|
||
|
_setmbcp( 932 );
|
||
|
i = _mbccmp( mb1, mb2 );
|
||
|
if( i == _NLSCMPERROR )
|
||
|
printf( "Error in multibyte character\n" );
|
||
|
else if( i < 0 )
|
||
|
printf( "Less than\n" );
|
||
|
else if( i == 0 )
|
||
|
printf( "Equal to\n" );
|
||
|
else
|
||
|
printf( "Greater than\n" );
|
||
|
|
||
|
}
|