[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to calculate the size of string in bytes?
From: |
tomas |
Subject: |
Re: how to calculate the size of string in bytes? |
Date: |
Tue, 18 Aug 2015 21:30:49 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tue, Aug 18, 2015 at 07:35:03PM +0300, Eli Zaretskii wrote:
> > Date: Tue, 18 Aug 2015 18:01:45 +0200
> > Cc: help-gnu-emacs@gnu.org
> > From: <tomas@tuxteam.de>
> >
> > I was thinking of "characters not expressible in UTF-8". Does Emacs have
> > those?
>
> Raw bytes come out as themselves (which might be invalid UTF-8), but
> that's not a failure, that's the user's fault, because they had those
> bytes in the buffer to begin with.
I was having difficulties in understanding you, so I tried it out. Now
I understand: Emacs's internal (raw) coding system can represent "characters
not expressible in utf-8". The function encode-coding-string passes those
bytes silently through, outputting an invalid utf-8 sequence.
So I venture the guess that when the Emacs buffer contains something
epressible as valid utf-8, 'utf-8 and 'raw are equivalent (what about
combining characters?)
Thanks for the insights
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlXTh+kACgkQBcgs9XrR2kZH2QCcDjlnu5BP0UxHnBweCdE9revf
sYoAn0fwO/WeoGirGfLlqA3lH1Cp9Bco
=IAVl
-----END PGP SIGNATURE-----
- how to calculate the size of string in bytes?, Sam Halliday, 2015/08/18
- Re: how to calculate the size of string in bytes?, tomas, 2015/08/18
- Re: how to calculate the size of string in bytes?, Eli Zaretskii, 2015/08/18
- Re: how to calculate the size of string in bytes?, tomas, 2015/08/18
- Re: how to calculate the size of string in bytes?, Eli Zaretskii, 2015/08/18
- Re: how to calculate the size of string in bytes?, tomas, 2015/08/18
- Re: how to calculate the size of string in bytes?, Eli Zaretskii, 2015/08/18
- Re: how to calculate the size of string in bytes?,
tomas <=
- Re: how to calculate the size of string in bytes?, Eli Zaretskii, 2015/08/18
- Re: how to calculate the size of string in bytes?, tomas, 2015/08/18
Re: how to calculate the size of string in bytes?, Stefan Monnier, 2015/08/18
Message not available
Message not available