Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.028 X-Spam-Evidence: '*H*': 0.94; '*S*': 0.00; 'completeness': 0.05; 'used.': 0.07; 'utf-8': 0.09; '>>>': 0.12; '712': 0.16; 'affiliates,': 0.16; 'currencies': 0.16; 'encode': 0.16; 'opened,': 0.16; 'received:155.180': 0.16; 'received:159.53': 0.16; 'received:169.70': 0.16; 'received:172.18.0': 0.16; 'received:bankone.net': 0.16; 'received:exchad.jpmchase.net': 0.16; 'received:jpmchase.com': 0.16; 'received:jpmchase.net': 0.16; 'received:svr.bankone.net': 0.16; 'solicitation': 0.16; 'standard)': 0.16; 'subject:Unicode': 0.16; 'url:disclosures': 0.16; 'url:jpmorgan': 0.16; 'convert': 0.19; 'to:2**1': 0.20; 'header:In-Reply-To:1': 0.21; 'applicable,': 0.23; 'converts': 0.23; 'herein': 0.23; 'works.': 0.23; 'received:169': 0.25; 'received:169.254': 0.25; 'string': 0.26; '(the': 0.28; 'reflect': 0.28; 'unicode': 0.29; '>and': 0.30; 'chase': 0.30; 'received:155': 0.30; 'received:159': 0.30; 'unicode,': 0.30; 'looks': 0.31; '(including': 0.32; 'does': 0.33; 'to:addr:python- list': 0.33; 'actually': 0.33; 'characters': 0.34; 'thank': 0.35; 'received:172.18': 0.35; 'phone:': 0.36; 'format.': 0.36; 'accepted': 0.36; 'charset:us-ascii': 0.36; 'change': 0.37; 'accuracy': 0.37; 'arising': 0.37; 'but': 0.38; 'data': 0.38; 'purposes': 0.38; 'subject:: ': 0.38; 'comments': 0.39; 'should': 0.39; 'legally': 0.39; 'to:addr:python.org': 0.39; 'under': 0.40; 'really': 0.40; 'below': 0.61; 'you.': 0.62; 'subject': 0.62; 'market': 0.63; 'virus': 0.63; 'free': 0.63; 'applicable': 0.65; 'co.,': 0.65; 'contact': 0.66; 'relating': 0.67; 'legal': 0.70; 'offer': 0.71; 'sale': 0.76; 'bank': 0.76; 'investment': 0.78; 'purchase': 0.83; 'affiliates.': 0.84; 'prices,': 0.84; 'defect': 0.91; 'instrument': 0.95; 'notice.': 0.96 X-DKIM: Sendmail DKIM Filter v2.8.4 sf3.jpmchase.com p4VGW5sg025546 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=jpmchase.com; s=smtpout; t=1306859526; bh=I+HipXlnvGu7/ez36XTZgF4HFSUrjyhOjgLtXsH1N7A=; h=From:To:Date:Subject:Message-ID:References:In-Reply-To: Content-Transfer-Encoding:MIME-Version:Content-Type; b=gQgJ1h1ZGiXNksanGzgHolz4JfqhHwNOu7XBCWxbKmkJgp9dIXnLUK+vhrHQS/2I1 mFamnmhqYQtnwrtcqDTmQdhZ23IitdFA5eslj2s5RdCAy0NJyYROpHM9gU0ec0AbNq qI/IvFbxsOfIpjA9cgHbGYg/0tlhOOUYGrjw9nAw= From: "Prasad, Ramit" To: "'Wolfgang Meiners'" , "'python-list@python.org'" Date: Tue, 31 May 2011 12:31:36 -0400 Subject: RE: sqlalchemy and Unicode strings: errormessage Thread-Topic: sqlalchemy and Unicode strings: errormessage Thread-Index: AcwfqphMbshr05uZRxmfLTSb9cRhvAAA1/NA References: <4de40ee8$0$6623$9b4e6d93@newsspool2.arcor-online.net> <4de50cfd$0$6538$9b4e6d93@newsspool4.arcor-online.net> In-Reply-To: <4de50cfd$0$6538$9b4e6d93@newsspool4.arcor-online.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DLP-FWD: Yes Content-Type: text/plain; charset="us-ascii" X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 38 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1306860979 news.xs4all.nl 49180 [::ffff:82.94.164.166]:57672 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:6741 >line =3D unicode(line=2Estrip(),'utf8')=0D=0A>and now i get really utf8-st= rings=2E It does work but i dont know why it works=2E For me it looks like = i change an utf8-string to an utf8-string=2E=0D=0A=0D=0A=0D=0AI would like = to point out that UTF-8 is not exactly "Unicode"=2E From what I understand,= Unicode is a standard while UTF-8 is like an implementation of that standa= rd (called an encoding)=2E Being able to convert to Unicode (the standard) = should mean you are then able to convert to any encoding that supports the = Unicode characters used=2E=0D=0A=0D=0AAs you can see below a string in UTF-= 8 is actually not Unicode=2E (decode converts to Unicode, encode converts a= way from Unicode)=0D=0A=0D=0A>>> type(u'test'=2Eencode('utf8'))=0D=0A=0D=0A>>> type('test'=2Edecode('utf8'))=0D=0A=0D=0A>>= > type('test'=2Eencode('utf8'))=0D=0A=0D=0A>>> type(u'test')=0D= =0A=0D=0A=0D=0A=0D=0ARamit=0D=0A=0D=0A=0D=0A=0D=0ARamit Pra= sad | JPMorgan Chase Investment Bank | Currencies Technology=0D=0A712 Main = Street | Houston, TX 77002=0D=0Awork phone: 713 - 216 - 5423=0D=0A=0D=0A=0D= =0AThis communication is for informational purposes only=2E It is not=0D=0A= intended as an offer or solicitation for the purchase or sale of=0D=0Aany f= inancial instrument or as an official confirmation of any=0D=0Atransaction= =2E All market prices, data and other information are not=0D=0Awarranted as= to completeness or accuracy and are subject to change=0D=0Awithout notice= =2E Any comments or statements made herein do not=0D=0Anecessarily reflect = those of JPMorgan Chase & Co=2E, its subsidiaries=0D=0Aand affiliates=2E=0D= =0A=0D=0AThis transmission may contain information that is privileged,=0D= =0Aconfidential, legally privileged, and/or exempt from disclosure=0D=0Aund= er applicable law=2E If you are not the intended recipient, you=0D=0Aare he= reby notified that any disclosure, copying, distribution, or=0D=0Ause of th= e information contained herein (including any reliance=0D=0Athereon) is STR= ICTLY PROHIBITED=2E Although this transmission and any=0D=0Aattachments are= believed to be free of any virus or other defect=0D=0Athat might affect an= y computer system into which it is received and=0D=0Aopened, it is the resp= onsibility of the recipient to ensure that it=0D=0Ais virus free and no res= ponsibility is accepted by JPMorgan Chase &=0D=0ACo=2E, its subsidiaries an= d affiliates, as applicable, for any loss=0D=0Aor damage arising in any way= from its use=2E If you received this=0D=0Atransmission in error, please im= mediately contact the sender and=0D=0Adestroy the material in its entirety,= whether in electronic or hard=0D=0Acopy format=2E Thank you=2E=0D=0A=0D=0A= Please refer to http://www=2Ejpmorgan=2Ecom/pages/disclosures for=0D=0Adisc= losures relating to European legal entities=2E