- Timestamp:
- Mar 4, 2011, 5:45:10 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/python/caca/common.py
r4398 r4774 276 276 ch -- the character to convert 277 277 """ 278 _lib.caca_utf8_to_utf32.argtypes = [ctypes.c_char_p, ctypes.POINTER(ctypes.c_size_t)] 278 _lib.caca_utf8_to_utf32.argtypes = [ctypes.c_char_p, 279 ctypes.POINTER(ctypes.c_size_t) 280 ] 279 281 _lib.caca_utf8_to_utf32.restype = ctypes.c_uint32 280 282 … … 289 291 _lib.caca_utf32_to_utf8.restype = ctypes.c_int 290 292 291 buf = ctypes.c_buffer( 2)293 buf = ctypes.c_buffer(7) 292 294 _lib.caca_utf32_to_utf8(buf, ch) 293 295 294 return buf 296 return buf.raw.rstrip('\x00') 295 297 296 298 def utf32_to_cp437(ch):
Note: See TracChangeset
for help on using the changeset viewer.