Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.116 X-Spam-Level: * X-Spam-Evidence: '*H*': 0.77; '*S*': 0.00; 'url:pypi': 0.03; 'ascii': 0.09; 'i.e.,': 0.16; 'wrote:': 0.18; 'seems': 0.21; '>>>': 0.22; 'example': 0.22; 'import': 0.22; 'header:User-Agent:1': 0.23; 'subject:Code': 0.24; 'unicode': 0.24; 'this:': 0.26; 'post': 0.26; 'header:In-Reply-To:1': 0.27; 'leave': 0.29; 'characters': 0.30; '-0700,': 0.31; 'work:': 0.31; 'url:python': 0.33; 'fri,': 0.33; 'received:209.85': 0.35; 'skip:u 20': 0.35; 'received:google.com': 0.35; 'url:org': 0.36; 'received:209': 0.37; 'handle': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'remove': 0.60; 'skip:u 10': 0.60; 'conversion': 0.61; 'content-disposition:inline': 0.62; 'email addr:gmail.com': 0.63; 'received:190': 0.69; '8bit%:100': 0.72; 'characters,': 0.84; 'received:190.163': 0.84; '2013': 0.98 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=b9nPWmQcDfqRYORY7PJ4mVkHx23FzJKajHds7grHfXA=; b=R71ZATu4eP+P8Vngx3vfQe7LOv9w9NzjulLMSmLgljHL2jJxr/xyIQruDopR1yKCif RFidWCXpbg0WR/fLLGir1SljZZQnCJ3ljbhZGIvXt8S/AgjO+FaghE4apJRybNEa0snZ 7DUCmi07FHBOIa/0rR7qTd3AFKwJ5gD42L4Qn8c3h01n6/uTVyliBvWzh9JdnBMZeh6E 11sC3Y66StQJg5goLAlV+WQ7CtZSiiomnzbSzreE/AkveOuIUxY92hT7CTTxhfeRGOJa LBgBDXtLLH+88s9M16eufnA7yNrq4sF0BkOdLlQwHLVkxyLUeZwzMlcKVt5wkz9xDVvp BCZw== X-Gm-Message-State: ALoCoQmS5jVKfiUBLg7G1rSQyFjzw24Jm2xpja9KGaOV3zuyehhW/Z4CoxMfc7zAFXN6eDgjiX0e X-Received: by 10.236.86.42 with SMTP id v30mr2114024yhe.92.1382133779712; Fri, 18 Oct 2013 15:02:59 -0700 (PDT) Date: Fri, 18 Oct 2013 19:02:54 -0300 From: Zero Piraeus To: python-list@python.org Subject: Re: Looking for UNICODE to ASCII Conversioni Example Code References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-PGP-Key: http://etiol.net/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1382133788 news.xs4all.nl 15996 [2001:888:2000:d::a6]:55964 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:57081 : On Fri, Oct 18, 2013 at 01:45:53PM -0700, caldwellinva@gmail.com wrote: > I am looking for an example of a UNICODE to ASCII conversion example > that will remove diacritics from characters (and leave the characters, > i.e., Klüft to Kluft) as well as handle the conversion of other > characters, like große to grosse. This: https://pypi.python.org/pypi/Unidecode/ ... seems to work: >>> from unidecode import unidecode >>> unidecode("Klüft, große") 'Kluft, grosse' >>> unidecode("Текст декодирует вы") 'Tekst dekodiruet vy' -[]z. -- Zero Piraeus: post scriptum http://etiol.net/pubkey.asc