Re: Can I mutilate UT_iconv_open()?


Subject: Re: Can I mutilate UT_iconv_open()?
From: Vlad Harchev (hvv@hippo.ru)
Date: Sat Mar 31 2001 - 00:25:02 CST


On Fri, 30 Mar 2001, Kevin Vajk wrote:

 Hi,
 
 Why you ask this? :)
 Of course feel free to modify it as you need..
 And also libiconv can be used as fallback (at compile time of course) if some
brokeness will be found in HP-UX's iconv in the future.

 I think it's easier to introduce macros CP_PREFIX and UCS2_NAME that will
expand to "cp" and "ucs2" on HP-UX and to "CP" and "UCS-2" on other platforms
(just #ifdef __hpux__ to switch definitions) rather than adding complex
algorithms for modifying charset name.

 Best regards,
  -Vlad

>
> I am wondering if I can modify UT_iconv_open().
>
> The deal on HP-UX is that the package configure script has to edit a file,
> because by default HP-UX doesn't recognize the same code-page names that
> tend to be in use on PC's and what not. (If I don't do this, abiword on
> HP-UX just can't open MS-Word documents.) For example, what PCs call
> "CP1252", HP-UX calls "cp1252". What PCs call "UCS-2", HP-UX calls "ucs2".
> My current work-around is to edit HP-UX's config files at installation time.
>
> However, what I'd like to do is modify UT_iconv_open() such that if
> iconv_open() fails, it'll try a few different permutations on the
> strings before giving up. (For example, it would convert to lower-case
> and remove dashes, then try again.)
>
> Does this sound really ugly to you guys? I realize that HP-UX isn't
> really your target platform, so let me know if you think this is the
> wrong thing to do. Thanks!
>
> --
> - Kevin Vajk
> <kvajk@ricochet.net>
>



This archive was generated by hypermail 2b25 : Sat Mar 31 2001 - 01:07:16 CST