Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29091 > unrolled thread

Re: Least-lossy string.encode to us-ascii?

Started byTerry Reedy <tjreedy@udel.edu>
First post2012-09-13 19:36 -0400
Last post2012-09-13 19:36 -0400
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.


Contents

  Re: Least-lossy string.encode to us-ascii? Terry Reedy <tjreedy@udel.edu> - 2012-09-13 19:36 -0400

#29091 — Re: Least-lossy string.encode to us-ascii?

FromTerry Reedy <tjreedy@udel.edu>
Date2012-09-13 19:36 -0400
SubjectRe: Least-lossy string.encode to us-ascii?
Message-ID<mailman.652.1347579452.27098.python-list@python.org>
On 9/13/2012 5:26 PM, 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.

'keep as much information as possible' would mean an effectively 
lossless transliteration, which you could do with a dict.
{<o-with-accent>: 'o', <c-cedilla>: 'c,' (or pick something that would 
never occur in normal text of the sort you are transmitting), ...}


-- 
Terry Jan Reedy

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web