[Vobject] importing UTF-8 text - UnicodeDecodeError
Matthew Leingang
leingang at courant.nyu.edu
Wed Mar 17 18:43:57 CDT 2010
Dear Jeffrey,
Thanks for the tip. I'll post to StackOverflow.
Best,
Matthew
On Mar 17, 2010, at 5:06 PM, Jeffrey Harris wrote:
> Hi Matthew,
>
> I think this is a good candidate for moving the discussion to StackOverflow (which is excellent, if you haven't tried it). I'd need to see more code to see what's going wrong, and email isn't the best medium for that.
>
> Basically, before you feed data to csv.reader, you want to be recoding from UTF-16-le to UTF-8, which you could do manually or using codecs.StreamRecoder. It sounds like you're doing that, though, so again, the question "How do I parse UTF-16-le encoded csv into Unicode cells" would be an excellent question for StackOverflow (with the relevant code sample). I'll answer it there later (although I imagine a dozen people will beat me to it).
>
> If you've got that working, and there's something going wrong in vobject, it would be good to add a few asserts that the data you're assigning to vobject ContentLine values is actually unicode. Let me know if this approach doesn't solve your problem.
>
> Sincerely,
> Jeffrey
> _______________________________________________
> VObject mailing list
> VObject at lists.skyhouseconsulting.com
> http://lists.skyhouseconsulting.com/mailman/listinfo/vobject
--
Matthew Leingang
Clinical Associate Professor of Mathematics
leingang at courant.nyu.edu
More information about the VObject
mailing list