Ignore:
Timestamp:
Sep 22, 2006, 12:36:00 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • Really export IRC as UTF-8, as advertised in the documentation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcaca/trunk/cucul/export.c

    r981 r1078  
    485485    unsigned int x, y;
    486486
    487     /* 11 bytes assumed for max length per pixel. Worst case scenario:
     487    /* 16 bytes assumed for max length per pixel. Worst case scenario:
    488488     * ^Cxx,yy   6 bytes
    489489     * ^B^B      2 bytes
    490      * ch        1 byte
     490     * ch        6 bytes
    491491     * \r\n      2 bytes
    492492     * In real life, the average bytes per pixel value will be around 5.
    493493     */
    494494
    495     ex->size = 2 + (cv->width * cv->height * 11);
     495    ex->size = 2 + (cv->width * cv->height * 16);
    496496    ex->data = malloc(ex->size);
    497497
     
    544544            }
    545545#endif
    546             *cur++ = ch & 0x7f;
     546            cur += cucul_utf32_to_utf8(cur, ch);
    547547            prevfg = fg;
    548548            prevbg = bg;
Note: See TracChangeset for help on using the changeset viewer.