Changeset 8263c68 in mainline


Ignore:
Timestamp:
2009-03-22T22:07:25Z (15 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a5e5030
Parents:
5251bab
Message:

unicode test (not working properly yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/print/print4.c

    r5251bab r8263c68  
    3333{
    3434        if (!quiet) {
    35                 printf("ASCII printable characters (32 - 127) using printf(%%c):\n");
     35                printf("ASCII printable characters (32 - 127) using printf(\"%%c\") and printf(\"%%lc\"):\n");
    3636               
    3737                uint8_t hextet;
     
    4343                                printf("%c", (char) ((hextet << 4) + index));
    4444                       
     45                        printf("  ");
     46                        for (index = 0; index < 16; index++)
     47                                printf("%lc", (wchar_t) ((hextet << 4) + index));
     48                       
    4549                        printf("\n");
    4650                }
    4751               
    48                 printf("\nExtended ASCII characters (128 - 255) using printf(%%c):\n");
     52                printf("\nExtended ASCII characters (128 - 255) using printf(\"%%c\") and printf(\"%%lc\"):\n");
    4953               
    5054                for (hextet = 8; hextet < 16; hextet++) {
     
    5559                                printf("%c", (char) ((hextet << 4) + index));
    5660                       
     61                        printf("  ");
     62                        for (index = 0; index < 16; index++)
     63                                printf("%lc", (wchar_t) ((hextet << 4) + index));
     64                       
    5765                        printf("\n");
    5866                }
    5967               
     68                printf("\nUTF-8 strings using printf(\"%%s\"):\n");
     69                printf("English: %s\n", "Quick brown fox jumps over the lazy dog");
     70                printf("Czech:   %s\n", "Příliš žluťoučký kůň úpěl dábelské ódy");
     71                printf("Greek:   %s\n", "Ὦ ξεῖν’, ἀγγέλλειν Λακεδαιμονίοις ὅτι τῇδε");
     72                printf("Hebrew:  %s\n", "משוואת ברנולי היא משוואה בהידרודינמיקה");
    6073        }
    6174       
Note: See TracChangeset for help on using the changeset viewer.