File: u_1_7_utf8.c

package info (click to toggle)
mcpp 2.7.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 8,024 kB
  • ctags: 29,151
  • sloc: ansic: 35,191; sh: 9,231; makefile: 176; cpp: 84; exp: 18
file content (16 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* u_1_7_utf8.c:    Invalid multi-byte character sequence (in string literal,
        character constant, header-name or comment).    */

#define str( a)     # a
#pragma __setlocale( "utf8")                /* For MCPP     */

main( void)
{
    char *  cp = str( "字");   /* 0xe5ad97 : legal */
    char *  ecp1 = str( "");   /* 0xc0af   : overlong  */
    char *  ecp2 = str( "");   /* 0xe09fbf : overlong  */
    char *  ecp3 = str( "");   /* 0xeda080 : UTF-16 surrogate  */

    return  0;
}