[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vim-dev
Subject:    Re: fileencoding feature request
From:       Miroslaw Dobrzanski-Neumann <mne () mosaic-ag ! com>
Date:       2003-09-30 9:57:36
[Download RAW message or body]

On Tue, Sep 30, 2003 at 10:57:24AM +0200, Bram Moolenaar wrote:
> 
> Miroslaw Dobrzanski-Neumann wrote:
> 
> > - despite of environment settings LANG,LC_TYPE,... vim should be able to
> >   recognize the UTF-8 encoding in a plain text file. There are well formed
> >   rules for UTF-8 encoding which allow a word processor to find out
> >   about this as soon as one or more multibyte sequences appears to it.
> 
> This works, see 'fileencodings'.
OK. I've overlooked this option.

> 
> > - as a special case are the xml files where the encoding declaration appears
> >   in the first line like
> >   <?xml version="1.0" encoding="UTF-8"?>
> >   vim should be aware of it
> 
> This has a chicken-egg problem: you need to read to file to be able to
> know how to read it.  Assuming ASCII would work to read the first line
> this might work.
In case of xml the first line until ?> must be ASCII encodded so there is not
a problem reading it

> Would require another field in 'fileencodings'.
> Probably "xml", so that ":set fencs=ucs-bom,xml,utf-8,latin-1" would
> work.  Does someone feel like implementing this?


> > This message is utf-8 encoded
> 
> It only contains ASCII, thus it's impossible to detect...
No the signature contains two polish characters
Mirosław Dobrzański-Neumann
-----^---------^-----------

I include the line as information for the netscape users. It appears that
Netscape a least up to version 7.4 is not able to evaluate the charset
attribute and the displayed mail text contains unreadable characters.

-- 
Mirosław Dobrzański-Neumann
E-mail: mne@mosaic-ag.com

This message is utf-8 encoded
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic