Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!hq-usenetpeers.eweka.nl!81.171.88.15.MISMATCH!eweka.nl!lightspeed.eweka.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'memory.': 0.05; 'ascii': 0.07; 'think,': 0.07; 'utf-8': 0.07; 'subject:How': 0.09; 'python': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:()': 0.09; 'subject:string': 0.09; 'subject:using': 0.09; 'count.': 0.16; 'elsewhere.': 0.16; 'fine.': 0.16; 'holy': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject: \n ': 0.16; 'subject:unicode': 0.16; 'subject:variable': 0.16; 'translated.': 0.16; 'usage,': 0.16; 'users.': 0.16; 'wrote:': 0.17; 'bytes': 0.17; 'pieces': 0.17; 'memory': 0.18; 'discussion': 0.20; 'do.': 0.21; 'recognize': 0.22; '(you': 0.23; 'non': 0.24; 'header:In- Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'coding': 0.27; 'question': 0.27; 'header:X-Complaints-To:1': 0.28; 'rest': 0.28; 'run': 0.28; 'scheme.': 0.29; 'character': 0.29; '8bit%:5': 0.29; "i'm": 0.29; 'problem.': 0.32; 'from:addr:yahoo.co.uk': 0.32; 'problem': 0.33; 'to:addr:python-list': 0.33; 'equal': 0.33; 'text': 0.34; 'especially': 0.35; 'there': 0.35; 'received:org': 0.36; 'but': 0.36; 'characters': 0.36; 'should': 0.36; 'enough': 0.36; 'does': 0.37; 'why': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'some': 0.38; 'nothing': 0.38; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40; 'end': 0.40; 'real': 0.61; 'amazing': 0.61; 'first': 0.61; 'kind': 0.61; 'between': 0.63; 'day.': 0.63; 'world': 0.63; 'email addr:gmail.com': 0.63; 'show': 0.63; 'charset:windows-1252': 0.65; 'treat': 0.65; 'wish': 0.70; 'away,': 0.84; 'subject:value': 0.84; 'period.': 0.95 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: How do I display unicode value stored in a string variable using ord() Date: Sun, 19 Aug 2012 11:46:14 +0100 References: <308df2af-abe7-4043-b199-0a39f440e0ab@googlegroups.com> <502f8a2a$0$29978$c3e8da3$5496439d@news.astraweb.com> <7xehn4vyya.fsf@ruckus.brouhaha.com> <7xfw7j3a1x.fsf@ruckus.brouhaha.com> <7xtxvzehhb.fsf@ruckus.brouhaha.com> <50309d69$0$29978$c3e8da3$5496439d@news.astraweb.com> <7x4nnzmhbn.fsf@ruckus.brouhaha.com> <7xy5lb9soz.fsf@ruckus.brouhaha.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Gmane-NNTP-Posting-Host: host-78-146-9-229.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20120713 Thunderbird/14.0 In-Reply-To: X-Antivirus: avast! (VPS 120819-0, 19/08/2012), Outbound message X-Antivirus-Status: Clean 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: 42 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1345373121 news.xs4all.nl 6937 [2001:888:2000:d::a6]:34027 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:27377 On 19/08/2012 09:54, wxjmfauth@gmail.com wrote: > About the exemples contested by Steven: > > eg: timeit.timeit("('ab…' * 10).replace('…', 'œ…')") > > > And it is good enough to show the problem. Period. The > rest (you have to do this, you should not do this, why > are you using these characters - amazing and stupid > question -) does not count. > > The real problem is elsewhere. *Americans* do not wish > a character occupies 4 bytes in *their* memory. The rest > of the world does not count. > > The same thing happens with the utf-8 coding scheme. > Technically, it is fine. But after n years of usage, > one should recognize it just became an ascii2. Especially > for those who undestand nothing in that field and are > not even aware, characters are "coded". I'm the first > to think, this is legitimate. > > Memory or "ability to treat all text in the same and equal > way"? > > End note. This kind of discussion is not specific to > Python, it always happen when there is some kind of > conflict between ascii and non ascii users. > > Have a nice day. > > jmf > Roughly translated. "I've been shot to pieces and having seen Monty Python and the Holy Grail I know what to do. Run away, run away" -- Cheers. Mark Lawrence.