| 
      
      
      From: Alecs K. <al...@pe...> - 2006-03-09 04:31:11
      
     | 
| On Wed, Mar 08, 2006 at 11:01:26PM +0000, Wenzhi Liang wrote:
> So the work around is still a work around.
For GUI Vims in the enc-cn locale (or :enc) that still can show utf-8,
yes.  But i may suggest they use utf-8 in the first place.
> > So there are several options for us:
These options are all (bad) workarounds too.
> > 1) We dont care about euc-cn any more.  utf-8 only, simple and clear.
Which means all the problems are NOT problems any more since there's no
euc-cn concerned.  We only support utf-8 and people must use utf-8 to
view our docs.  This of course will piss off enc-cn users.
> hmmm. How do we achieve that? I tried to set LANG=zh_CN.UTF-8 and
> vim still can't display usr_24.txt
Thats weird.  utf-8 files cant be viewed in the utf-8 environment?  Your
:enc is?  I tested gvim with :enc=utf-8.  No problems at all.
> > 2) We care about euc-cn by sacrificing utf-8 quality (change/remove
> >    questionable chars).
> 
> Don't think that's a good idea.
Ack.
> > 3) With utf-8 versions being good and untouched, we start maintaining
                                          ^^^^^^^^^
> >    and providing separate euc-cn versions (iconv -c).
                     ^^^^^^^^
> I think 'iconv -c' simply drop the character that it has problem with.
We can change it to something else like ??
> Then is this not the same as 2?
No.  The utf-8 version remains good and utf-8 users are happy as ever.
And for enc-cn users, we provide a compromised version to avoid junk
files.  This is IMHO by far the most possible workaround if we still
consider enc-cn people.  We can detect or let user specify locale/:enc
in our install script.  Or, we can directly provide two tarballs to let
users choose to download and install whichever suits them.
> > 4) Patch Vim to make it act like iconv -c when it's doing conversion.
> 
> Don't think Vim's maintainer would be happy with this. Same reason as 3.
Pretty hard.  Even if he does accept it, though in little chance,
there might be a long time till people use that patched version, if any.
> If I understand correctly, it is because iconv doesn't support gbk?
No, it's not.  iconv has no problem and it does its job _pretty_ well
in its own right.  The problem is because of the gbk/gb2312 encodings
themselves:  they just dont have those foreign characters and thus the
chars cant be converted to and correctly displayed in gb locale/:enc.
utf-8 rox.  Ken Thompson kicks ass.  But we live in a messy world.
-- 
Alecs King
 |