Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29081
| Date | 2012-09-13 17:06 -0500 |
|---|---|
| From | Tim Chase <python.list@tim.thechases.com> |
| Subject | Re: [SOLVED] Least-lossy string.encode to us-ascii? |
| References | <50524F6F.6070604@tim.thechases.com> <CAHzaPEMyvFUR+f6zC8=LJwOOy4bricM=e0h-mYN4Aukb86Dz7w@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.644.1347573916.27098.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: [SOLVED] Least-lossy string.encode to us-ascii? Tim Chase <python.list@tim.thechases.com> - 2012-09-13 17:06 -0500
csiph-web