[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unibyte characters, strings, and buffers

From: David Kastrup
Subject: Re: Unibyte characters, strings, and buffers
Date: Sat, 29 Mar 2014 18:18:54 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Nathan Trapuzzano <address@hidden> writes:

> Nathan Trapuzzano <address@hidden> writes:
>> For example, say we decode a stream of raw bytes as utf8, but that the
>> stream contains some non-utf8 sequences.
> Of course, most programming languages would simply refuse to decode by,
> e.g., throwing an exception.  But that's not really appropriate for an
> editor.  On one hand, you need some way to distinguish between
> characters and bytes, even if the distinction's not made by the type
> system; on the other hand, an _editor_ of all things should be able to
> deal with both kinds at the same time without the distinction being
> lost, and Emacs does a tremendous job at this IMO.

_De_coding into a _unibyte_ buffer is a lossy operation by definition
since a unibyte buffer cannot hold the full set of values that
_de_coding delivers.

David Kastrup

reply via email to

[Prev in Thread] Current Thread [Next in Thread]