Ronan Waide <[EMAIL PROTECTED]> writes:

> I'm still not 100% clear on the "right" way to solve the coding-sytems
> problem. Ideally, I'd like the BBDB file to be coding-systems agnostic
> and still provide reasonable mapping back into the real world.

Hm?  What does it mean for a file to be coding system agnostic?
Clearly, you have to select *some* encoding for the characters on
disk.

Note that the buffer contents themselves are stored in the internal
encoding anyway.  So the buffers always use the same encoding.  (If
you have a Latin-1 file and an iso-2022-7bit file that contain the
same characters, then reading both files into a buffer will result in
the same buffer contents.  Many problems in Emacs result from the
fact that a Latin-1 � and a Latin-2 � are not considered the same
character in Emacs.  But this factoid is only relevant to European
users, Asian users probably don't care at all.)

> This sort of hints that it should store everything in unicode/utf-8
> or thereabouts. This is, however, a big change, and I'm reluctant to
> undertake it while in my current "spare time? what spare time?"
> frame of mind. If anyone else has had a look at this, please let me
> know.

Note that Unicode cannot (yet?) represent all the characters that
Emacs can represent.

The easiest solution clearly is to just use the internal encoding for
storing the file on disk.  The problem with this solution is also
clear: many users do not normally use that encoding for their files,
so the .bbdb file will have a different encoding than other files.
This might cause surprises when .bbdb is accessed by other programs
such as grep.

Another possibility is to save .bbdb like any other file.  This means
that Emacs will ask about the encoding if .bbdb contains any
characters that can't be encoded in the usual encoding.

Dave's patches are an incremental change from this idea: the actual
encoding used is stored in the file.  This is useful if the .bbdb
encoding differs from the normal encoding: in that case, Emacs can
read it in properly even though it might not normally be able to
determine the coding system from the contents of .bbdb.

The current situation is undesirable because BBDB always uses the
encoding specified by bbdb-file-coding-system, whether or not it can
actually encode the characters used.

I hope this cleared up some things.  But maybe it was just rambling,
in which case I apologize for the line noise.

-- 
~/.signature is: umop ap!sdn    (Frank Nobis)


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to