Wireshark-dev: Re: [Wireshark-dev] Replacing g_iconv and different codesets

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 20 Dec 2013 11:35:19 -0800
On Dec 20, 2013, at 11:24 AM, Jakub Zawadzki <darkjames-ws@xxxxxxxxxxxx> wrote:

> In euc-kr [1] you can see that it's using ksc5601_to_ucs4() which can be find in ksc5601.h [2].
> ksc5601_to_ucs4() is using convertation tables: __ksc5601_hangul_to_ucs, __ksc5601_hanja_to_ucs, __ksc5601_sym_to_ucs
> from ksc5601.c [3].
> 
> These tables are quite big (about 1K lines) and __ksc5601_sym_to_ucs is using C99 array index initialization
> (which you would need to expand (covert to switch?) before commiting).
> 
> So I'd rather suggest still using g_iconv() for EUC-KR, but feel free to introduce new ENC_EUC_KR and move it to core.

...and even if we do use g_iconv() for EUC-KR (or anything else), it should ideally be buried in tvb_get_string_enc() and so on, rather than directly used in dissectors.