From: <tomas@tuxteam.de>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: how to calculate the size of string in bytes?
Date: Tue, 18 Aug 2015 22:11:18 +0200 [thread overview]
Message-ID: <20150818201118.GA26004@tuxteam.de> (raw)
In-Reply-To: <831tf0l6l5.fsf@gnu.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, Aug 18, 2015 at 10:49:58PM +0300, Eli Zaretskii wrote:
> > Date: Tue, 18 Aug 2015 21:30:49 +0200
> > Cc: help-gnu-emacs@gnu.org
> > From: <tomas@tuxteam.de>
> >
> > I was having difficulties in understanding you
>
> Sorry about that. It's a complex issue to explain in a few words.
No need to be sorry. The fault's on me -- once I did my homework
things improved :-)
Thanks for your patience: very much appreciated.
> > Now I understand: Emacs's internal (raw) coding system can represent
> > "characters not expressible in utf-8".
>
> More accurately, it can represent characters outside the Unicode code
> space.
>
> And please don't call that "raw"; the internal representation of
> characters used by Emacs is known as 'utf-8-emacs'.
Ah, OK. Point taken.
> > The function encode-coding-string passes those bytes silently
> > through, outputting an invalid utf-8 sequence.
>
> Yes. Although in interactive functions Emacs will normally complain
> and ask for a better encoding.
Understood
> > So I venture the guess that when the Emacs buffer contains something
> > epressible as valid utf-8, 'utf-8 and 'raw are equivalent
>
> Yes.
>
> > (what about combining characters?)
>
> Emacs doesn't normalize/compose/decompose characters when it encodes
> text (with a notable exception of the utf-8-hfs encoding).
> Applications that want this should do that themselves, e.g. using the
> facilities in ucs-normalize.el.
Thanks: I learned quite a bit now :-)
regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEUEARECAAYFAlXTkWYACgkQBcgs9XrR2kaQbwCggSK12zVBjHiFowFVsddq36SJ
XmAAmON/V8XcGaUfjxW1llhEavSqcp0=
=fYz9
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2015-08-18 20:11 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 9:11 how to calculate the size of string in bytes? Sam Halliday
2015-08-18 10:13 ` tomas
2015-08-18 14:37 ` Eli Zaretskii
2015-08-18 14:45 ` tomas
2015-08-18 15:00 ` Eli Zaretskii
2015-08-18 16:01 ` tomas
2015-08-18 16:35 ` Eli Zaretskii
2015-08-18 19:30 ` tomas
2015-08-18 19:49 ` Eli Zaretskii
2015-08-18 20:11 ` tomas [this message]
2015-08-18 21:47 ` Stefan Monnier
2015-08-19 5:43 ` tomas
[not found] ` <mailman.8577.1439934462.904.help-gnu-emacs@gnu.org>
2015-08-19 8:57 ` Sam Halliday
2015-08-19 9:22 ` Sam Halliday
2015-08-19 19:47 ` Stefan Monnier
[not found] ` <mailman.8504.1439892841.904.help-gnu-emacs@gnu.org>
2015-08-18 10:43 ` Sam Halliday
2015-08-18 11:47 ` tomas
[not found] ` <mailman.8510.1439898432.904.help-gnu-emacs@gnu.org>
2015-08-18 12:06 ` Sam Halliday
2015-08-18 14:34 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150818201118.GA26004@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=eliz@gnu.org \
--cc=help-gnu-emacs@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.