Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29081 > unrolled thread

Re: [SOLVED] Least-lossy string.encode to us-ascii?

Started byTim Chase <python.list@tim.thechases.com>
First post2012-09-13 17:06 -0500
Last post2012-09-13 17:06 -0500
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.


Contents

  Re: [SOLVED] Least-lossy string.encode to us-ascii? Tim Chase <python.list@tim.thechases.com> - 2012-09-13 17:06 -0500

#29081 — Re: [SOLVED] Least-lossy string.encode to us-ascii?

FromTim Chase <python.list@tim.thechases.com>
Date2012-09-13 17:06 -0500
SubjectRe: [SOLVED] Least-lossy string.encode to us-ascii?
Message-ID<mailman.644.1347573916.27098.python-list@python.org>
On 09/13/12 16:44, Vlastimil Brom wrote:
> >>> import unicodedata
> >>> unicodedata.normalize("NFD", u"serviço móvil").encode("ascii", "ignore").decode("ascii")
> u'servico movil'

Works well for all the test-cases I threw at it.  Thanks!

-tkc

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web