Unicode literals and byte string interpretation.
- From: Fletcher Johnson <flt.johnson@xxxxxxxxx>
- Date: Thu, 27 Oct 2011 20:05:13 -0700 (PDT)
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.
.
- Follow-Ups:
- Re: Unicode literals and byte string interpretation.
- From: Steven D'Aprano
- Re: Unicode literals and byte string interpretation.
- From: Chris Angelico
- Re: Unicode literals and byte string interpretation.
- From: David Riley
- Re: Unicode literals and byte string interpretation.
- Prev by Date: Re: __dict__ attribute for built-in types
- Next by Date: Re: Assigning generator expressions to ctype arrays
- Previous by thread: NLTK and package structure
- Next by thread: Re: Unicode literals and byte string interpretation.
- Index(es):
Relevant Pages
|