From: David Kastrup <dak@gnu.org>
To: guile-user@gnu.org
Subject: Re: Running script from directory with UTF-8 characters
Date: Wed, 23 Dec 2015 23:25:15 +0100 [thread overview]
Message-ID: <87y4ckg5v8.fsf@fencepost.gnu.org> (raw)
In-Reply-To: 87poxwajso.fsf@elektro.pacujo.net
Marko Rauhamaa <marko@pacujo.net> writes:
> David Kastrup <dak@gnu.org>:
>
>> That's more economical than Python's method which uses the encodings
>> of surrogate words not allowed in properly encoded UTF-8, taking
>> 3 bytes rather than the 2 Emacs makes do with. Using high codepoints
>> above the Unicode space would even take 4 bytes.
>
> Actually, CPython represents strings internally even less
> "economically:" it uses single-byte strings if it can (Latin-1). If it
> can't, it uses all-two-byte strings (UCS-2). If it can't do even that,
> it uses all-four-byte strings (UCS-4). Thus, even a single code point
> above 65535 will cause the whole string to consist of 4-byte integers.
Maybe I confused Python and Perl here. No idea. But I'm pretty sure
about Emacs.
--
David Kastrup
next prev parent reply other threads:[~2015-12-23 22:25 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-21 21:09 Running script from directory with UTF-8 characters Vicente Vera
2015-12-21 23:19 ` Marko Rauhamaa
2015-12-22 0:34 ` Chris Vine
2015-12-22 1:14 ` Marko Rauhamaa
2015-12-22 14:21 ` Chris Vine
2015-12-22 15:55 ` Marko Rauhamaa
2015-12-22 20:12 ` Chris Vine
2015-12-22 20:36 ` Marko Rauhamaa
2015-12-22 20:59 ` Eli Zaretskii
2015-12-22 21:39 ` Marko Rauhamaa
2015-12-23 18:28 ` Eli Zaretskii
2015-12-23 19:18 ` Marko Rauhamaa
2015-12-23 19:33 ` Eli Zaretskii
2015-12-23 21:15 ` Marko Rauhamaa
2015-12-23 21:53 ` David Kastrup
2015-12-23 22:20 ` Marko Rauhamaa
2015-12-23 22:25 ` David Kastrup [this message]
2015-12-24 16:13 ` Barry Schwartz
2015-12-22 14:32 ` Vicente Vera
2015-12-22 15:56 ` Marko Rauhamaa
2015-12-26 1:57 ` Vicente Vera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y4ckg5v8.fsf@fencepost.gnu.org \
--to=dak@gnu.org \
--cc=guile-user@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).