Ronan Waide <[EMAIL PROTECTED]> writes:

> This is the current code:
>
> ;; iso-2022-7bit should be OK (but not optimal for Emacs, at least --
> ;; emacs-mule would be better) with both Emacs 21 and XEmacs.  Emacs
> ;; 22 will really need utf-8-emacs.
> (defconst bbdb-file-coding-system (if (fboundp 'coding-system-p)
>                       (cond ((coding-system-p 'utf-8-emacs)
>                  'utf-8-emacs)
>                 ((coding-system-p 'mule-utf-8)
>                  'mule-utf-8)
>                 (t 'iso-2022-7bit)))
>   "Coding system used for reading and writing `bbdb-file'.
> This should not be changed by users.")
>
> The mule-utf-8 stuff was contributed by someone using Emacs 22

For what reason?  They were wrong anyway, as I said:

emacs-version
  => "22.0.50.10"
(with-temp-buffer
  (insert-file-contents (expand-file-name "HELLO" data-directory))
  (car (memq 'mule-utf-8 (find-coding-systems-region 1 (point-max)))))
  => nil
(with-temp-buffer
  (insert-file-contents (expand-file-name "HELLO" data-directory))
  (car (memq 'iso-2022-7bit (find-coding-systems-region 1 (point-max)))))
  => iso-2022-7bit

[By the way, the comment above mentioning Emacs 22 is now wrong, since
the development branch was re-numbered, sigh.  Currently I think the
value of `22' for the Unicode-based version should be `23', but who
knows if that code base will ever see the light of day?]

> (ha, and me just ranting about not supporting CVS/unreleased
> versions) and has been in place since March 19th this year. It
> pretty cleary says to me that if it's not defined as a coding system
> then it won't get used.

Yes, but it is defined in Emacs 21; that doesn't mean it will encode
arbitrary Emacs characters, as in examples.  `utf-8-emacs' will in the
Unicode-based version, by virtue of being a big superset of Unicode.

> So have you actually had it corrupt a file on you,

Yes.  The check which would prevent that on saving the file (if I
remember correctly) isn't in the released version.

> or are you
> just commenting on the mere presence of mule-utf-8 in the code (which
> seems to be a utf-8 fundamentalism of its own...)?
>
> Personally I'm leery of touching any of the coding stuff

I fixed it some time ago (although I really shouldn't have listened to
people wanting to share .bbdb with XEmacs, which is fundamentally
losing, and just used emacs-mule encoding).  It's just been broken.

Coding conversion is actually quite simple -- you just have to
remember it when converting between internal and external data,
(whether or not the internal form is Unicode based).


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to