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


Groups > comp.lang.python > #29077

Least-lossy string.encode to us-ascii?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python.list@tim.thechases.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.013
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:skip:s 10': 0.05; "'replace')": 0.16; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'message-id:@tim.thechases.com': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; 'us-ascii': 0.16; "i'd": 0.22; "i've": 0.23; 'header:User- Agent:1': 0.26; 'possible,': 0.27; "doesn't": 0.28; 'becomes': 0.30; 'to:addr:python-list': 0.33; 'text': 0.34; 'subject:?': 0.35; 'there': 0.35; 'but': 0.36; 'stock': 0.36; 'anything': 0.36; 'to:addr:python.org': 0.39; 'subject:-': 0.40; 'information': 0.63; 'received:50.22': 0.84; 'to:name:python': 0.84
Date Thu, 13 Sep 2012 16:26:07 -0500
From Tim Chase <python.list@tim.thechases.com>
User-Agent Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111120 Icedove/3.1.16
MIME-Version 1.0
To Python <python-list@python.org>
Subject Least-lossy string.encode to us-ascii?
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-AntiAbuse This header was added to track abuse, please include it with any abuse report
X-AntiAbuse Primary Hostname - boston.accountservergroup.com
X-AntiAbuse Original Domain - python.org
X-AntiAbuse Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse Sender Address Domain - tim.thechases.com
X-Source
X-Source-Args
X-Source-Dir
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.640.1347571498.27098.python-list@python.org> (permalink)
Lines 11
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1347571498 news.xs4all.nl 6973 [2001:888:2000:d::a6]:52813
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:29077

Show key headers only | View raw


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.

-tkc


Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Least-lossy string.encode to us-ascii? Tim Chase <python.list@tim.thechases.com> - 2012-09-13 16:26 -0500
  Re: Least-lossy string.encode to us-ascii? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-09-14 03:49 +0000
  Re: Least-lossy string.encode to us-ascii? wxjmfauth@gmail.com - 2012-09-14 09:15 -0700
    Re: Least-lossy string.encode to us-ascii? Terry Reedy <tjreedy@udel.edu> - 2012-09-14 16:43 -0400
      Re: Least-lossy string.encode to us-ascii? wxjmfauth@gmail.com - 2012-09-15 01:58 -0700
      Re: Least-lossy string.encode to us-ascii? wxjmfauth@gmail.com - 2012-09-15 01:58 -0700
  Re: Least-lossy string.encode to us-ascii? wxjmfauth@gmail.com - 2012-09-14 09:15 -0700

csiph-web