Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29083 > unrolled thread
| Started by | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| First post | 2012-09-13 15:29 -0700 |
| Last post | 2012-09-13 15:29 -0700 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Least-lossy string.encode to us-ascii? Ethan Furman <ethan@stoneleaf.us> - 2012-09-13 15:29 -0700
| From | Ethan Furman <ethan@stoneleaf.us> |
|---|---|
| Date | 2012-09-13 15:29 -0700 |
| Subject | Re: Least-lossy string.encode to us-ascii? |
| Message-ID | <mailman.645.1347575865.27098.python-list@python.org> |
[sorry for the direct reply, Tim]
Tim Chase wrote:
> I've got a bunch of text in Portuguese and to transmit them, need to
> have them in us-ascii (7-bit). I'd like to keep as much information
> as possible, just stripping accents, cedillas, tildes, etc. So
> "serviço móvil" becomes "servico movil". Is there anything stock
> that I've missed? I can do mystring.encode('us-ascii', 'replace')
> but that doesn't keep as much information as I'd hope.
I haven't yet used it myself, but I've heard good things about
http://pypi.python.org/pypi/Unidecode/
~Ethan~
Back to top | Article view | comp.lang.python
csiph-web