split problem if the delimiter is inside the text limiter
bdesth.quelquechose at free.quelquepart.fr
Wed Mar 18 22:46:13 CET 2009
rewonka a écrit :
> Now i stucked when i tried to pu into db.
> Because i have some cell that is in somekind of unicoded text,
You mean "encoded in something else than utf8" ?
> and i'm
> looking a solution how to put this into db (my db in utf-8 format).
> but something binary in a cell, the pgdb says it is not in utf-8
> format, or something like this.
You have to know the original encoding (I mean, the one used for the csv
file), else there's nothing you can do. Then it's just a matter of
decoding (to unicode) then encoding (to utf8), ie (if your source is in
utf_string = latin1_string.decode("latin1").encode("utf8")
More information about the Python-list