perl-unicode

Re: system 'iconv' considered harmful. was: Source data for perl encodings

2001-01-08 20:34:55

Nick Ing-Simmons <nick(_at_)ing-simmons(_dot_)net> writes:

Owen Taylor <otaylor(_at_)redhat(_dot_)com> writes:

- Use the system iconv when it exists and is sufficiently good

So what is Configure supposed to do?

  - Feed a set of files through system's iconv 
    and check for correct results?
  - How do I find out what names system iconv is using?

I don't think a configure time check by feeding through the
system's iconv is a good idea, though you'd probably want
to test whatever conversion routines you chose in 'make check'.

I'd probably go with the ugly solution of just checking
for particular systems to determine the default and then
allow people to override them in cases where the default
choice wasn't OK.


For the naming problem, I think you can generally count on
not having conflicting names, so I'd take the approach of:

 - iconv open with the supplied name

 - if that fails, look in a list of aliases for alternate
   character set names to try.

Character set naming, while certainly not properly standardized,
is not such a huge problem as to make it impossible to handle.
It's not like you'll ask for 'iso-8859-1' and find out that
that's the system's name for 'SJIS'.

Regards,
                                        Owen