On 08/20/2012 07:17 AM, Roy Smith wrote:
> In article <mailman.3538.1345442498.4697.python-l...@python.org>,
>  Michael Torrie <torr...@gmail.com> wrote:
> 
>> Python generally tries to follow unicode
>> encoding rules to the letter.  Thus if a piece of text cannot be
>> represented in the character set of the terminal, then Python will
>> properly err out.  Other languages you have tried, likely fudge it
>> somehow.  
> 
> And if you want the "fudge it somehow" behavior (which is often very 
> useful!), there's always http://pypi.python.org/pypi/Unidecode/

Sweet tip, thanks!  I often want to process text that has smart quotes,
emdashes, etc, and convert them to plain old ascii quotes, dashes,
ticks, etc.  This will do that for me without resorting to a bunch of
regexes.  Bravo.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to