Ignore:
Timestamp:
Mar 15, 2006, 11:02:08 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • UTF-8 support in the Win32 driver.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/caca/driver_win32.c

    r582 r612  
    201201        uint32_t c = kk->qq->chars[i];
    202202
     203#if 0
    203204        if(c > 0x00000020 && c < 0x00000080)
    204             kk->drv.p->buffer[i].Char.AsciiChar = (char)c;
     205            kk->drv.p->buffer[i].Char.AsciiChar = (uint8_t)c;
    205206        else
    206207            kk->drv.p->buffer[i].Char.AsciiChar = ' ';
     208#else
     209        if(c > 0x00000020 && c < 0x00010000)
     210            kk->drv.p->buffer[i].Char.UnicodeChar = (uint16_t)c;
     211        else
     212            kk->drv.p->buffer[i].Char.UnicodeChar = (uint16_t)' ';
     213#endif
    207214
    208215        kk->drv.p->buffer[i].Attributes =
     
    218225    rect.Right = kk->qq->width - 1;
    219226    rect.Bottom = kk->qq->height - 1;
     227#if 0
    220228    WriteConsoleOutput(kk->drv.p->front, kk->drv.p->buffer, size, pos, &rect);
     229#else
     230    WriteConsoleOutputW(kk->drv.p->front, kk->drv.p->buffer, size, pos, &rect);
     231#endif
    221232}
    222233
Note: See TracChangeset for help on using the changeset viewer.