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

20 lines
325 B
C
Raw Permalink Normal View History

#include <stdio.h>
#include <mbctype.h>
#include <mbstring.h>
unsigned char mb1[2] = {
0x00, 0x00
};
unsigned char mb2[4] = {
0x81, 0x42, 0x81, 0x41
};
void main()
{
_setmbcp( 932 );
printf( "%#6.4x\n", mb1[0] << 8 | mb1[1] );
_mbccpy( mb1, mb2 );
printf( "%#6.4x\n", mb1[0] << 8 | mb1[1] );
}