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


Groups > comp.lang.python > #33458

Re: latin1 and cp1252 inconsistent?

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!xlned.com!feeder1.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <d@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.046
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'python': 0.09; 'encode': 0.09; 'indicates': 0.09; 'cc:addr:python-list': 0.10; 'email addr:yelp.com': 0.16; 'guess.': 0.16; 'wrote:': 0.17; 'deleted.': 0.17; 'specify': 0.17; 'creates': 0.18; 'all,': 0.21; 'trying': 0.21; 'cc:2**0': 0.23; "haven't": 0.23; 'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'guess': 0.27; 'case,': 0.29; 'character': 0.29; 'maybe': 0.29; 'expect': 0.31; 'code': 0.31; 'version': 0.34; "can't": 0.34; 'loss': 0.34; 'acceptable': 0.35; 'data,': 0.35; 'pm,': 0.35; 'subject:?': 0.35; "won't": 0.35; 'really': 0.36; 'but': 0.36; 'characters': 0.36; 'data.': 0.36; 'data': 0.37; 'subject:: ': 0.38; 'fact': 0.38; 'some': 0.38; 'received:192': 0.39; 'received:192.168': 0.40; 'your': 0.60; 'between': 0.63; 'skip:n 10': 0.63; 'more': 0.63; 'header:Reply- To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'received:74.208.4.194': 0.84; 'from.': 0.93
Date Fri, 16 Nov 2012 19:05:32 -0500
From Dave Angel <d@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1
MIME-Version 1.0
To buck@yelp.com
Subject Re: latin1 and cp1252 inconsistent?
References <f063ebaf-89ee-4558-a762-0241efa39dcc@googlegroups.com> <mailman.3762.1353105272.27098.python-list@python.org> <4c683e33-d6cb-480c-a6da-20e3523c2103@googlegroups.com>
In-Reply-To <4c683e33-d6cb-480c-a6da-20e3523c2103@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:KhESGU8KIoCSvhQEnDJn9/2y9OUhpAw/zf80g9/t0Xz yFx3QCBtL7kqXvw0FslC9+RoGgpLKF/N9jteSq1iQbH2soLodx FaSRR2aXnG2L1AIWC7DpRB6tDt5Wrg+abbPRkQyVJ24mygzLzv 5JvnkwF0MxiRgQjgnEs/FgAKbbW3jKDTNUz7sJl2Dk1/msdSs3 WEZgkZlBi7UsRPrlKJzWzxp+nTEg3IEM2g99niPp6VaiBlywJW TSnQtSBroYCzqrh4Y+xqa1ZvBYg/Zxp1HqkOe7K/fljGg3FnjB d8AgA/ExAE23DVKFStwWICNAwQl1atBlHbipPumgfAyOQ7ZEA= =
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To d@davea.name
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.3766.1353110765.27098.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1353110765 news.xs4all.nl 6980 [2001:888:2000:d::a6]:49914
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33458

Show key headers only | View raw


On 11/16/2012 06:27 PM, buck@yelp.com wrote:
> (doublespaced nonsense deleted.  GoogleGropups strikes again.)
> This creates a non-reversible encoding, and loss of data, which isn't
> acceptable for my application. 

So tell us more about your application.  If you have data which is
invalid, and you encode it to some other form, you have to expect that
it won't be reversible.  But maybe your data isn't really characters at
all, and you're just trying to manipulate bytes?

Without a use case, we really can't guess.  The fact that you are
waffling between latin1 and 1252 indicates this isn't really character data.

Also, while you're at it, please specify the Python version and OS
you're on.  You haven't given us any code to guess it from.

-- 

DaveA

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


Thread

latin1 and cp1252 inconsistent? buck@yelp.com - 2012-11-16 13:44 -0800
  Re: latin1 and cp1252 inconsistent? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-16 15:33 -0700
    Re: latin1 and cp1252 inconsistent? buck@yelp.com - 2012-11-16 15:27 -0800
      Re: latin1 and cp1252 inconsistent? Dave Angel <d@davea.name> - 2012-11-16 19:05 -0500
      Re: latin1 and cp1252 inconsistent? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-16 17:20 -0700
      Re: latin1 and cp1252 inconsistent? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-11-18 01:48 -0500
    Re: latin1 and cp1252 inconsistent? buck@yelp.com - 2012-11-16 15:27 -0800
  Re: latin1 and cp1252 inconsistent? Nobody <nobody@nowhere.com> - 2012-11-17 00:33 +0000
    Re: latin1 and cp1252 inconsistent? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-16 18:08 -0700
    Re: latin1 and cp1252 inconsistent? buck@yelp.com - 2012-11-17 08:56 -0800
      Re: latin1 and cp1252 inconsistent? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-17 11:08 -0700
      Re: latin1 and cp1252 inconsistent? Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-17 11:13 -0700
      Re: latin1 and cp1252 inconsistent? Nobody <nobody@nowhere.com> - 2012-11-17 19:15 +0000

csiph-web