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

21 lines
357 B
C
Raw Normal View History

#include <stdio.h>
#include <mbctype.h>
#include <mbstring.h>
char alphabet[] = {
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
};
void main()
{
int i;
unsigned short c;
_setmbcp( 932 );
for( i = 0; i < sizeof( alphabet ) - 1; i++ ) {
c = _mbbtombc( alphabet[ i ] );
printf( "%c%c", c>>8, c );
}
printf( "\n" );
}