Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'utf-8': 0.07; 'ascii': 0.09; 'bytes,': 0.09; 'extends': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'strings.': 0.09; 'unified': 0.09; 'url:software': 0.09; '"to': 0.16; '8-bit': 0.16; 'byte,': 0.16; 'encodings': 0.16; 'rather,': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'unicode.': 0.16; 'url:gnu': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'header:User-Agent:1': 0.23; 'bytes': 0.24; 'example.': 0.24; 'unicode': 0.24; 'defined': 0.27; 'header:X-Complaints-To:1': 0.27; '[1]': 0.29; 'character': 0.29; 'characters': 0.30; 'text': 0.33; 'raw': 0.33; 'something': 0.35; 'editor': 0.35; 'but': 0.35; 'representing': 0.36; 'sequence': 0.36; 'url:org': 0.36; 'example,': 0.37; 'represent': 0.38; 'to:addr:python-list': 0.38; 'short': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'numbers': 0.61; 'simply': 0.61; 'email addr:gmail.com': 0.63; 'within': 0.65; 'characters,': 0.84; 'from:addr:jeremy': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Jeremy Sanders Subject: Re: RE Module Performance Date: Thu, 25 Jul 2013 14:36:25 +0100 References: <571a6dfe-fd66-42cf-92fc-8b97cbe6e9e4@googlegroups.com> <51DFDE65.5040001@Gmail.com> <4f1067f6-bc99-42ad-9166-37fb228b90e8@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: xpc1.ast.cam.ac.uk User-Agent: KNode/4.10.5 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: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1374759404 news.xs4all.nl 15989 [2001:888:2000:d::a6]:40545 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:51217 wxjmfauth@gmail.com wrote: > Short example. Writing an editor with something like the > FSR is simply impossible (properly). http://www.gnu.org/software/emacs/manual/html_node/elisp/Text-Representations.html#Text-Representations "To conserve memory, Emacs does not hold fixed-length 22-bit numbers that are codepoints of text characters within buffers and strings. Rather, Emacs uses a variable-length internal representation of characters, that stores each character as a sequence of 1 to 5 8-bit bytes, depending on the magnitude of its codepoint[1]. For example, any ASCII character takes up only 1 byte, a Latin-1 character takes up 2 bytes, etc. We call this representation of text multibyte. ... [1] This internal representation is based on one of the encodings defined by the Unicode Standard, called UTF-8, for representing any Unicode codepoint, but Emacs extends UTF-8 to represent the additional codepoints it uses for raw 8- bit bytes and characters not unified with Unicode. " Jeremy