Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81072 > unrolled thread
| Started by | Chris Angelico <rosuav@gmail.com> |
|---|---|
| First post | 2014-11-20 23:41 +1100 |
| Last post | 2014-11-20 23:41 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: python 2.7 and unicode (one more time) Chris Angelico <rosuav@gmail.com> - 2014-11-20 23:41 +1100
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2014-11-20 23:41 +1100 |
| Subject | Re: python 2.7 and unicode (one more time) |
| Message-ID | <mailman.16016.1416487322.18130.python-list@python.org> |
On Thu, Nov 20, 2014 at 11:35 PM, Peter Otten <__peter__@web.de> wrote: > You don't need to change an all-ascii bytestring to unicode. > Lo and behold: > >>>> "%s %s" % (u"üblich", u"ähnlich") > u'\xfcblich \xe4hnlich' >>>> u"%s %s" % (u"üblich", u"ähnlich") > u'\xfcblich \xe4hnlich' > > Only non-ascii bytestrings mean trouble, either noisy > It's better to not depend on that, though. Be clear and explicit about the difference between bytes and text, and don't try to pretend they're the same thing, even for ASCII. ChrisA
Back to top | Article view | comp.lang.python
csiph-web