Changeset 1776 for libcaca


Ignore:
Timestamp:
Jun 27, 2007, 8:00:18 PM (16 years ago)
Author:
Sam Hocevar
Message:
  • Use cucul_utf32_to_ascii() when the SLang backend does not support UTF-8.
File:
1 edited

Legend:

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

    r1774 r1776  
    455455    char buf[10];
    456456    int bytes;
     457#else
     458    char ascii;
    457459#endif
    458460
     
    465467    SLsmg_write_string(buf);
    466468#else
    467     if(ch < 0x80)
    468         SLsmg_write_char(ch);
    469     else if(cucul_utf32_is_fullwidth(ch))
    470         SLsmg_write_string("? ");
    471     else
    472         SLsmg_write_char('?');
     469    ascii = cucul_utf32_to_ascii(ch);
     470    SLsmg_write_char(ascii);
     471    if(cucul_utf32_is_fullwidth(ch))
     472        SLsmg_write_char(ascii);
    473473#endif
    474474}
Note: See TracChangeset for help on using the changeset viewer.