jed-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: charset.sl


SANGOI DINO wrote:
 Ok, this is a general character set handler for Jed. It is a generalization
of my previous utf16.sl

Great!

It still can automatically recognise UTF-16 Little Endian encoded files. I
was thinking about something like modehook.sl, looking for -*- encoding:
utf-8 -*-, or something like that, but a way more integrated with modehook
would be nice. Also some formats already have this info, e.g. XML.


Modehook only runs after the file is loaded so you can only recode the
buffer in memory. We could add more switches to modeline_hook2:

   { case "coding": ...              // this is already used by python
   { case "encoding": ...

from which we could call charset_convert_buffer_to_utf8.
If there is no modeline for encoding we could use a more
elaborate guess_charset() to detect the encoding of
the memory buffer and then call charset_convert_buffer_to_utf8.

guess_charset could also call XXX_guess_charset for specific modes
(tex_guess_charset, html_guess_charset, ...).

some thougths:
http://ruptured-duck.com/jed-users/msg00515.html

Marko


--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]