[Top][All Lists]

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

Re: Creating a coding system

From: Thien-Thi Nguyen
Subject: Re: Creating a coding system
Date: Sat, 20 Dec 2014 16:56:00 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

() David Kastrup <address@hidden>
() Sat, 20 Dec 2014 15:19:18 +0100

   I am missing the big picture here in some manner.  Does
   decoding not start from a byte stream but rather from an
   emacs-utf-8 encoded version of a byte stream?  That does not
   seem to make sense to me.

Have you tried specifying ‘:coding-type raw-text’?  I see in
src/coding.c line 5339 (from a mid-October pre-Git tree) the
nice number 1:

static void
decode_coding_raw_text (struct coding_system *coding)
  bool eol_dos = [...]

  coding->chars_at_source = 1;
It is the only instance in src/*.c of that literal value being
assigned to that struct member.  A truly singular hint?  :-D

I imagine that aside from ‘raw-text’, decoding is multi-layered
due to the presence of ‘undecided’ (which requires guesswork,
heuristics, and (maybe) backtracking) and that the design tries
to move data from bytes to characters as soon as possible, to
reduce downstream complexity and for cohesion w/ the rest of
Emacs.  But, that's merely ignorant speculation...

Thien-Thi Nguyen
   GPG key: 4C807502
   (if you're human and you know it)
      read my lisp: (responsep (questions 'technical)
                               (not (via 'mailing-list)))
                     => nil

Attachment: signature.asc
Description: PGP signature

reply via email to

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