awesome slugify and unicode

Chris Angelico rosuav at gmail.com
Thu Jan 23 05:49:04 EST 2014


On Thu, Jan 23, 2014 at 9:41 PM,  <wxjmfauth at gmail.com> wrote:
>>>> "Is ♬ ♫ ♪ ♩ a melody or just noise?".encode('ascii', 'replace').decode('ascii')
> 'Is ? ? ? ? a melody or just noise?'
>>>>
>>>>
>
> cp1252 analogy.
>
>>>> 'abc€€€'.encode('cp1252').decode('ascii', 'replace').encode('ascii', 'replace').decode('ascii')
> 'abc???'
>>>>
>
> Again, not a "unicode" question, more "how to handle strings in a judicious way?"

I don't want a cp1252 analogy, I want the exact same thing implemented
in cp1252. You said the same work could be done there. That work
includes dealing with musical notes. How are you going to do that?

ChrisA



More information about the Python-list mailing list