Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'received:209.85.223': 0.03; 'cpython': 0.05; 'startup': 0.05; 'cmd': 0.09; 'bug': 0.10; 'subject:error': 0.11; 'times,': 0.13; '(like': 0.15; 'benjamin': 0.16; 'subject:unicode': 0.16; 'zsh': 0.16; 'string': 0.17; 'wrote:': 0.17; 'processor': 0.17; 'unicode': 0.17; 'shell': 0.18; 'windows': 0.19; 'equivalent': 0.20; 'work.': 0.23; 'url:bugs': 0.24; 'command': 0.24; 'script': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'setting': 0.26; 'run': 0.28; 'worked': 0.30; 'code': 0.31; 'url:python': 0.32; 'getting': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'whatever': 0.35; 'mine': 0.35; 'skip:. 20': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'message- id:@gmail.com': 0.36; 'url:org': 0.36; 'does': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'page': 0.38; 'to:addr:python.org': 0.39; 'received:192': 0.39; 'received:192.168': 0.40; 'header:Received:5': 0.40; 'needing': 0.62; 'skip:6 10': 0.63; 'love': 0.63; 'oscar': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=CbRyMYmz9PZ2lZZWOQHMcjEgVp2ddOhCLdcDL/nl2XU=; b=ZM81Kk6Fm4RI6Hj+cQdH5dEibfKH389sstF/4BBUdwdWgdo94CfWeulCr2g+6Xf67n AZR2b6QmdYMk2CXHtMUNiFTQgqSqrGai2Byt5k+8FR3lvwqSOLdrstYS3fRi+lUFrDJe ETkz/quyCwyavKTHc9pjzLd3HYAj6XAlHSGbhkCa3wg2Sy3LXrNyL/BO8/+hZyO+UKVv InnvAW157nnH4cjf3lL0Dsv1mHrMHFP9w3zJe/ioKE2VcSNCMYf9eoxyYMsVNQmenX+a ZFLtNQanvopA/FQ7GYZtyfWo6ELJXAK+Ev7W9D9+iF9W3IU9PVonnHTsLaGVsOKeiLMo NG1Q== Date: Thu, 08 Nov 2012 21:30:46 -0600 From: Andrew Berg User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: "comp.lang.python" Subject: Re: Right solution to unicode error? References: <09a3d20b-5871-47f4-9218-df119698e405@m4g2000yqf.googlegroups.com> <509AF3EF.8050108@gmail.com> In-Reply-To: X-Enigmail-Version: 1.4.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1352431857 news.xs4all.nl 6903 [2001:888:2000:d::a6]:54120 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32993 On 2012.11.08 08:06, Oscar Benjamin wrote: > It would be a lot better though if it just worked straight away > without me needing to set the code page (like the terminal in every > other OS I use). The crude equivalent of .bashrc/.zshrc/whatever shell startup script for cmd is setting a string value (REG_SZ) in HKCU\Software\Microsoft\Command Processor named autorun and setting that with whatever command(s) you want to run whenever the shell starts. Mine has a value of '@chcp 65001>nul'. I actually run zsh when practical (gotta love Cygwin) and I have an equivalent command in my .zshrc. Getting unicode to work in a Windows is a hassle, but it /can/ work. CPython does have a bug that makes it annoying at times, though - http://bugs.python.org/issue1602 -- CPython 3.3.0 | Windows NT 6.1.7601.17835