On Tue, 22 May 2001, ha shao wrote:
> Patch to add codepage items for Chinese. Really useful?
It would be nice to commit it.
Also everywhere, CJK hackers told us that not all iconv
implementations know "CP950" and "CP936" under these names - if it's true for
iconv AW is linked with, fallback charset names "BIG5" and "GB2312" should be
used.
So, I'd suggest to change the code as I did for Wv in text.c -
#define CPNAME_OR_FALLBACK(destination,name,fallbackname) \
{ \
static char* cpname = NULL; \
if (!cpname) \
{ \
iconv_t cd = iconv_open(name,name); \
if (cd==(iconv_t)-1) \
{ \
cpname = fallbackname; \
} \
else \
{ \
cpname = name; \
iconv_close(cd); \
} \
}; \
destination = cpname; \
}
And instead of something like this
m_szEncoding = "CP936";
something like this should be used:
CPNAME_OR_FALLBACK(m_szEncoding,"CP936","GB2312");
Both switches should be modified (the one that maps encoding number to
charset name, and the one that maps font charset number to encoding name).
Could somebody fix this?
Best regards,
-Vlad
- Re: Patch: Fix for Bug 1164, 2nd try Andrew Dunbar
- Re: Patch: Fix for Bug 1164, 2nd try ha shao
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try Andrew Dunbar
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try Andrew Dunbar
- Re: Patch: Fix for Bug 1164, 2nd try ha shao
- Re: Patch: Fix for Bug 1164, 2nd try Hubert Figuiere
- Re: Patch: Fix for Bug 1164, 2nd try Andrew Dunbar
- Re: Patch: Fix for Bug 1164, 2nd try Hubert Figuiere
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try Hubert Figuiere
- Re: Patch: Fix for Bug 1164, 2nd try Vlad Harchev
- Re: Patch: Fix for Bug 1164, 2nd try Hubert Figuiere
- Re: Patch: Fix for Bug 1164, 2nd try ha shao
- iconv vs. libiconv, was Re: Patch: Fix for Bug 11... Andrew Dunbar
- Re: iconv vs. libiconv, was Re: Patch: Fix fo... ha shao
- Re: iconv vs. libiconv, was Re: Patch: Fix fo... Vlad Harchev
- Re: iconv vs. libiconv, was Re: Patch: Fi... Andrew Dunbar
- Re: iconv vs. libiconv, was Re: Patch: Fi... ha shao
