Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29081
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!news.unit0.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python.list@tim.thechases.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03; 'subject:skip:s 10': 0.05; 'cc:addr:python-list': 0.10; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'message-id:@tim.thechases.com': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'threw': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'subject:] ': 0.19; 'import': 0.21; 'cc:2**0': 0.23; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'skip:" 20': 0.26; 'thanks!': 0.26; 'subject:?': 0.35; 'skip:u 20': 0.36; 'subject:-': 0.40; 'received:50.22': 0.84 |
| Date | Thu, 13 Sep 2012 17:06:25 -0500 |
| From | Tim Chase <python.list@tim.thechases.com> |
| User-Agent | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111120 Icedove/3.1.16 |
| MIME-Version | 1.0 |
| To | Vlastimil Brom <vlastimil.brom@gmail.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> |
| In-Reply-To | <CAHzaPEMyvFUR+f6zC8=LJwOOy4bricM=e0h-mYN4Aukb86Dz7w@mail.gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | 8bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - boston.accountservergroup.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - tim.thechases.com |
| X-Source | |
| X-Source-Args | |
| X-Source-Dir | |
| Cc | Python <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.644.1347573916.27098.python-list@python.org> (permalink) |
| Lines | 10 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1347573916 news.xs4all.nl 6967 [2001:888:2000:d::a6]:39809 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:29081 |
Show key headers only | View raw
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