Thomas Dickey-san wrote (12/25/08 11:11 PM):
On Thu, 25 Dec 2008, Thomas Dickey wrote:

@@ -952,6 +952,20 @@ int UCTransUniCharStr(char *outbuf,
HTSprintf0(&tocode, "%s//TRANSLIT", LYCharSet_UC[charset_out].MIMEname);
         cd = iconv_open(tocode, "UTF-16BE");
         FREE(tocode)
+        if (cd == (iconv_t)-1) {
+        HTSprintf0(&tocode, "%s", LYCharSet_UC[charset_out].MIMEname);

I'm puzzled here - since TRANSLIT is less stringent, I would expect
that the check would be first made on the exact translation rather
than on the transliteration.   Any comments?

looking a little further, I see that the issue is that TRANSLIT is
a glibc extension, so it's tried first in case it works.  (google didn't
show much comment about whether it's more/less likely to succeed than the
plain POSIX version).


Yes, you're right.
This means Solaris iconv always failed the "$ENCODING//TRANSLIT".
So if iconv_open("$ENCODING, "UTF-16BE") is added without "//TRANSLIT", it 
works on none GNU iconv.


> -  if ((strcmp(LYCharSet_UC[charset_out].MIMEname, "shift_jis") == 0) ||
> -      (strcmp(LYCharSet_UC[charset_out].MIMEname, "euc-jp") == 0)) {
> +  if (LYCharSet_UC[charset_out].codepage == 0 &&
> +      LYCharSet_UC[charset_out].codepoints == 0) {
>        iconv_t cd;

This means I'd like to use iconv for CJK but not Japanese only.


_______________________________________________
Lynx-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lynx-dev

Reply via email to