Thomas -

> CC to Debian's bug tracker to publish the workaround.
> 
> * Bram Moolenaar <[EMAIL PROTECTED]> [20050306 12:34]:
> > > * Bram Moolenaar <[EMAIL PROTECTED]> [20050305 21:30]:
> > > > The digraphs are separate from most other things, they don't depend on
> > > > the locale.  What is 'encoding' set to anyway?  Do you see a difference
> > > > between what ":digraphs" shows for the version that works and the
> > > > version that doesn't work?
> > > 
> > > I've attached the output of :digraph without .vimrc or .vim
> > > directory. They have some differences.
> > 
> > What you show here looks like 'encoding' is set to latin9 (iso-8859-15).
> > 
> > Vim internally stores the digraphs in Unicode.  When used they are
> > converted to the current 'encoding'.
> > 
> > You need to define the digraph in Unicode, not latin9.  But Unicode to
> > latin9 conversion might not work.  Vim 7 has this builtin for that
> > reason, but it's not in Vim 6.3.
> > 
> > You can try defining the digraph like this:
> > 
> >     :dig ee 8364
> 
> This works with version 6.3.x and [EMAIL PROTECTED], but not with
> older versions or a different ctype.
> 
> My current workaround is:
> 
>   if version >= 603 && v:ctype == "[EMAIL PROTECTED]"
>     digraph ee 8364
>   else
>     digraph ee 164
>   endif
> 
> > However, this might not work if your iconv() doesn't support latin9.  Or
> > when the +iconv feature is missing (check :version output).  It does
> > work for me, also in Vim 6.3.
> 
> Is iconv used to convert 164 to unicode when defining the digraph?
> You write that vim7 has built in code for this, so is it a problem
> in libiconv?

The conversion is only used to convert the resulting character from
Unicode to 'encoding'.  As you can read at ":help digraph-encoding",
they are always defined as Unicode.

This was indeed added between Vim 6.2 and Vim 6.3.  Before 6.3 it was
quite messy, you had to define different digraphs for each value of
'encoding'.

For most latin1 characters it doesn't make a difference, the euro sign
is one of the exceptions.

- Bram

-- 
Not too long ago, compress was something you did to garbage...

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\     Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html   ///


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to