From: Yi-an H. <yia...@gm...> - 2006-03-10 01:07:39
|
I think there is a "nearly" perfect solution. Use iconv with gb18030 as the "to" encoding works exactly as we want. You don't need the -c flag. There will be no error, all questionable characters are marked as ??. What is more, it is in fact "lossless". When you convert it back to utf-8, it is identical to the original file. I say it is "nearly" perfect because you still cannot read them correctly i= n gb encodings. But one can keep only copies from one encoding and convert it "losslessly" to the other encoding, if necessary. I have not tested under all environments. Your environment may not support gb18030. But maybe we can try. On 3/9/06, Wenzhi Liang <wen...@gm...> wrote: > > wandys, > > > > > > hmmm. How do we achieve that? I tried to set LANG=3Dzh_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? You= r > > :enc is? I tested gvim with :enc=3Dutf-8. No problems at all. > > It turns out that (on my sytem at least), vim ignores the $LANG env var > and > set the 'enc' option based on $LC_ALL. So if I have $LC_ALL=3Dzh_CN.UTF-8= it > is OK. So there are two ways to do this: > 1) in the shell, set LC_ALL=3Dzh_CN.UTF-8, which might not be ideal for s= ome > user, > me included. > 2) in vim, set 'enc' to utf-8. > > This actually sounds OK to me. The euc-cn users will actually not miss ou= t > big because it is only a small portion of the whole translation that won'= t > be > viewed easily. If we can fix two more (as Willis suggested?), it looks > like a > good compromise. > > But I think this is easier for the GUI user and not so much for the > console > user? What do you think wandys? > > > > 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. > > This sounds OK too and it would definitely please both crowds. But it > doens't > please me. :-). It just feels strange to have two releases for one thing. > But > then again, who am I asking to be pleased? Pondering... > > So right now, I'd lean towards an all utf solution. > > Any more inputs? > > lang2 > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > that extends applications into web and mobile media. Attend the live > webcast > and join the prime developer group breaking into this new coding > territory! > http://sel.as-us.falkag.net/sel?cmdlnk&kid=110944&bid$1720&dat=121642 > _______________________________________________ > Vimcdoc-translate mailing list > Vim...@li... > https://lists.sourceforge.net/lists/listinfo/vimcdoc-translate > |