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


Groups > comp.lang.python > #52371

Re: Could you verify this, Oh Great Unicode Experts of the Python-List?

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status UNSURE 0.219
X-Spam-Level **
X-Spam-Evidence '*H*': 0.64; '*S*': 0.08; 'subject:Python': 0.06; 'arguments': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'parts,': 0.16; 'subject:Could': 0.16; 'subject:Unicode': 0.16; 'wrote:': 0.18; '>>>': 0.22; 'aug': 0.22; 'references': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'subject:the': 0.34; 'received:google.com': 0.35; 'subject:List': 0.36; 'subject:?': 0.36; 'to:addr:python-list': 0.38; 'does': 0.39; 'url:2012': 0.39; 'to:addr:python.org': 0.39; 'read': 0.60; "you're": 0.61; 'more': 0.64; 'between': 0.67; 'combining': 0.68; 'article': 0.77; 'url:wordpress': 0.78; 'counts': 0.83; 'subject:this': 0.83; 'characters,': 0.84; 'subject:you': 0.87; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=FwGThOuddMVUpSnCLnZ1Q4FyqeB5efBokSi/PnMnMQU=; b=J8np9LHSYe+Wdk2e4BIpzndTSE8OwUpSDkhsbcbHQzzRTaFx5sDBtlLVmpoUE9zekz qp3Hn4PXnkXYCthMApuLxnS8ULKmk3qLB7wsOFyRP/DdODjWFRU6kH+yGa7HHvFsqmow COYz+2HeR5BQXDjH+kpiL+adv8o8E8cuN/h4y3ztRpQRgqnU5Zfn19VFmTOZhh/Ox4dh ISI++qRwFkGJZrO9Uq6VkXoKqMZdt8AjhXuzHZ4E96C6b5vhNMRO7l4YEjJm7F3yWU8b H4ma0KRivDimRygYvmwl0Omek9jFueqL4r5vW1ohvtQq1kppRVO09owBebQKkyaIn7FS oXFQ==
MIME-Version 1.0
X-Received by 10.52.89.170 with SMTP id bp10mr3262546vdb.104.1376202263603; Sat, 10 Aug 2013 23:24:23 -0700 (PDT)
In-Reply-To <CAN1F8qXgBwTGSkbP3N1uJZPJw1CY=4O4ptQurV-2=Gmm4UiYbw@mail.gmail.com>
References <CAN1F8qXgBwTGSkbP3N1uJZPJw1CY=4O4ptQurV-2=Gmm4UiYbw@mail.gmail.com>
Date Sun, 11 Aug 2013 07:24:23 +0100
Subject Re: Could you verify this, Oh Great Unicode Experts of the Python-List?
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Mailman-Approved-At Sun, 11 Aug 2013 11:00:37 +0200
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
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.471.1376211637.1251.python-list@python.org> (permalink)
Lines 23
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1376211638 news.xs4all.nl 15935 [2001:888:2000:d::a6]:33315
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52371

Show key headers only | View raw


On Sun, Aug 11, 2013 at 7:17 AM, Joshua Landau <joshua@landau.ws> wrote:
> Given tweet = b"caf\x65\xCC\x81".decode():
>
>     >>> tweet
>     'café'
>
> But:
>
>     >>> len(tweet)
>     5

You're now looking at the difference between glyphs and combining
characters. Twitter counts combining characters, so when you build one
"thing" out of lots of separately-typed parts, it does count as more
characters.

Read this article for some arguments on the subject, including a
number of references to Twitter itself:

http://unspecified.wordpress.com/2012/04/19/the-importance-of-language-level-abstract-unicode-strings/

ChrisA

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


Thread

Re: Could you verify this, Oh Great Unicode Experts of the Python-List? Chris Angelico <rosuav@gmail.com> - 2013-08-11 07:24 +0100

csiph-web