Artie Ziff wrote:
>
>if I am using the standard csv library to read contents of a csv file
>which contains Unicode strings (short example:
>'\xe8\x9f\x92\xe8\x9b\x87'),
You need to be rather precise when talking about this. That's not a
"Unicode string" in Python terms. It's an 8-bit string.
Chris Angelico wrote:
> On Mon, Aug 15, 2011 at 4:20 PM, Artie Ziff wrote:
>> if I am using the standard csv library to read contents of a csv file
>> which contains Unicode strings (short example:
>> '\xe8\x9f\x92\xe8\x9b\x87'), how do I use a python Unicode method such as
>> decode or encode to
On 8/15/2011 11:29 AM, Adam Tauno Williams wrote:
On Mon, 2011-08-15 at 08:20 -0700, Artie Ziff wrote:
if I am using the standard csv library to read contents of a csv file
which contains Unicode strings (short example:
'\xe8\x9f\x92\xe8\x9b\x87'), how do I use a python Unicode method such
as de
On Mon, 2011-08-15 at 08:20 -0700, Artie Ziff wrote:
> if I am using the standard csv library to read contents of a csv file
> which contains Unicode strings (short example:
> '\xe8\x9f\x92\xe8\x9b\x87'), how do I use a python Unicode method such
> as decode or encode to transform this string ty
On Mon, Aug 15, 2011 at 4:20 PM, Artie Ziff wrote:
> if I am using the standard csv library to read contents of a csv file which
> contains Unicode strings (short example: '\xe8\x9f\x92\xe8\x9b\x87'), how do
> I use a python Unicode method such as decode or encode to transform this
> string type i
On Jun 18, 3:23 pm, CiTro wrote:
> Thank you, Peter. That solved my problem.
the another way is,
codecs.raw_unicode_escape_decode(stringOne) == stringTwo
--
http://mail.python.org/mailman/listinfo/python-list
Thank you, Peter. That solved my problem.
--
http://mail.python.org/mailman/listinfo/python-list
CiTro wrote:
> I'm looking for a way to convert a string to it's unicode "brother".
>
> This means:
>
> stringOne = "\u0026"
> stringTwo = u"\u0026"
>
> print unicode(stringOne) == stringTwo
>
> The result is false. What function should I use, to duplicate the
> effect of the "u" prefix ?
"\u