Hello.
I have a problem with code and decode chars. This is my code:

# coding: utf8

result = cdb.executesql("SELECT * FROM laptops")

for reg in result:
    text = ("NĂºmero de serie: "+reg[0]).decode("utf8").encode("latin1")



And this is the error: *("N\xc3\xbamero de serie: 
"+reg[0]).decode("utf8").encode("latin1")\nUnicodeDecodeError: \'ascii\' 
codec can\'t decode byte 0xc3 in position 1: ordinal not in range(128)\n' *
*
*
Database sqlite is UTF8.

Thanks.

-- 



Reply via email to