package bbdb
tags 351778 +patch
thanks

Hi again, ;)

I found the main reason for the data corruption that François experienced.  
Even though BBDB rewrites the coding cookie as iso-2022-7bit, Emacs 21 will 
still try to save the .bbdb file using the old coding system, which results in 
garbage when the file is read again, as it reads the old coding system codes, 
thinking that it's reading the new coding system.  I've sent the attached patch 
to upstream, which ensures that Emacs will write the file using the correct 
coding system, and upstream has more or less accepted it.  (It should show up 
in CVS soon.)

Given that, as I mentioned in my previous message, forcing the coding system is 
a bugfix that upstream implemented, and this attached patch fixes the data 
corruption, I think that this bug can be considered fixed.

<bbdb.patch>

-- 
Hubert Chan - email & Jabber: [EMAIL PROTECTED] - http://www.uhoreg.ca/
PGP/GnuPG key: 1024D/124B61FA   (Key available at wwwkeys.pgp.net)
Fingerprint: 96C5 012F 5F74 A5F7 1FF7  5291 AF29 C719 124B 61FA
--- bbdb-2.35.cvs20060204.orig/lisp/bbdb.el
+++ bbdb-2.35.cvs20060204/lisp/bbdb.el
@@ -2452,7 +2452,8 @@
     (insert-before-markers (format ";; -*-coding: %s;-*-\n"
                                    bbdb-file-coding-system)))
   (setq bbdb-modified-p nil
-        bbdb-changed-records nil)
+        bbdb-changed-records nil
+	buffer-file-coding-system bbdb-file-coding-system)
   (let ((buf (get-buffer bbdb-buffer-name)))
     (when buf
       (with-current-buffer buf

Reply via email to