struct / union in initializer, RFE #901.
[sdcc.git] / sdcc / support / regression / tcc / 97_utf8_string_literal.c
blob6546013b30620a33fd2b1a5af77c35cae0784b1a
1 // this file contains BMP chars encoded in UTF-8
2 #include <stdio.h>
3 #include <wchar.h>
4 #include <stdlib.h>
5 #include <string.h>
7 int main(void)
9 char hello_world_in_czech[] = "čau, světe";
10 char hello_world_in_czech_ucn[] = "\u010dau, sv\u011bte";
11 if (sizeof(hello_world_in_czech) != sizeof(hello_world_in_czech_ucn)
12 || strcmp(hello_world_in_czech, hello_world_in_czech_ucn))
13 return -1;
15 wchar_t s[] = L"hello$$你好¢¢世界€€world";
16 wchar_t *p;
17 for (p = s; *p; p++) printf("%04X ", (unsigned) *p);
18 printf("\n");
19 return 0;