Hi Bram and all,
The help on iconv() writes:
When the conversion fails an empty string is returned.
In fact, I have not found a way to make the conversion fail.
When a file containing the following text encoded in cp936 is read in
Vim as euc-jp, Vim complains "[CONVERSION ERROR in line 1]":
TVアニメ 宙のまにまに EDテーマ「星屑のサラウンド」/CooRie
However, when one tries to get the failure from an iconv call, the
error is never got:
(:set encoding=utf-8)
:echo iconv(iconv('TVアニメ 宙のまにまに
EDテーマ「星屑のサラウンド」/CooRie','utf-8','cp936'),'euc-jp','utf-8')
TVアニメ 帑のまにまに EDテ??`マ仝佛仄のサラウンド々????CooRie
Any ideas? Is there a bug, or some issues with the help?
This behaviour is reproduced on Windows, Mac OS X, and Linux.
If the iconv call returned an empty string, it could be used in a
plug-in to detect a mistake in guessing the encoding.
Best regards,
Yongwei
--
Wu Yongwei
URL: http://wyw.dcweb.cn/
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---