Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed10.multikabel.net!feeder2.cambriumusenet.nl!feed.tweaknews.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'example:': 0.03; 'transform': 0.07; 'python': 0.08; 'csv': 0.09; 'subject:string': 0.09; 'library': 0.15; 'encode': 0.16; 'subject:unicode': 0.16; 'thanks!': 0.16; 'string': 0.26; 'unicode': 0.29; 'received:24': 0.32; 'to:addr:python-list': 0.33; 'header:User-Agent:1': 0.34; 'message-id:@gmail.com': 0.34; 'file': 0.36; 'using': 0.37; 'open': 0.37; 'received:google.com': 0.38; 'received:209.85': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.218.46': 0.91; 'received:mail-yi0-f46.google.com': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=8A1q+AGIAsRhZ0rBfd1mcRBogPYCtQ4mQZfYVV+Xblg=; b=TZEJGypO6vHWX6rfqmvK2OcULnpzGHrgITtImYFDLtbg9IT2uShYxAT39LtlIeTywG JDaZTdULVf+hcKL7+vqBtBek3ikblJD7dBMSn5pAKoR3Bd4LhnuWPhI0eyDe70XPI5Qt 3U7VOu73XC1TXK3mOchtnJFNYehWOgn3EczEY= Date: Mon, 15 Aug 2011 08:20:22 -0700 From: Artie Ziff User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: python-list@python.org Subject: string to unicode Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 10 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1313421630 news.xs4all.nl 23888 [2001:888:2000:d::a6]:35215 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11463 if I am using the standard csv library to read contents of a csv file which contains Unicode strings (short example: '\xe8\x9f\x92\xe8\x9b\x87'), how do I use a python Unicode method such as decode or encode to transform this string type into a python unicode type? Must I know the encoding (byte groupings) of the Unicode? Can I get this from the file? Perhaps I need to open the file with particular attributes? thanks!