Re: Unicode literals and byte string interpretation.
- From: David Riley <fraveydank@xxxxxxxxx>
- Date: Thu, 27 Oct 2011 23:37:01 -0400
On Oct 27, 2011, at 11:05 PM, Fletcher Johnson wrote:
If I create a new Unicode object u'\x82\xb1\x82\xea\x82\xcd' how does
this creation process interpret the bytes in the byte string? Does it
assume the string represents a utf-16 encoding, at utf-8 encoding,
etc...?
For reference the string is これは in the 'shift-jis' encoding.
Try it and see! One test case is worth a thousand words. And Python has an interactive interpreter. :-)
- Dave.
- References:
- Unicode literals and byte string interpretation.
- From: Fletcher Johnson
- Unicode literals and byte string interpretation.
- Prev by Date: Re: Assigning generator expressions to ctype arrays
- Next by Date: Re: Unicode literals and byte string interpretation.
- Previous by thread: Unicode literals and byte string interpretation.
- Next by thread: Re: Unicode literals and byte string interpretation.
- Index(es):
Relevant Pages
|