[rt-devel] Re: I18N with Perl 5.6.1 and Solaris 8

Stanislav Sinyagin ssinyagin at yahoo.com
Wed Mar 5 07:52:34 EST 2003


Hi all, 

--- Autrijus Tang <autrijus at autrijus.org> wrote:
> On Tue, Mar 04, 2003 at 09:58:06AM -0800, Stanislav Sinyagin wrote:
> > > In Solaris, iconv is sensitive to the charset name. It looks up 
> > > the filenames in /usr/lib/iconv/ for the corresponding from-to pair, and 
> > > issues error if there's no such file. See the whole directory listing, attached.
> > > From the listing, you can see that:
> > > Latin1 is recognized as "ISO8859-1" or "8859-1" instead of "iso-8859-1", 
> > > Unicode is recognized as "UTF-8" instead of "utf-8", 
> > > Cyrillics is recognized as "KOI8-R" or "koi8-r" (interesting (8^))
> 
> I think I'll do a fuzzy match against the supported names, if there
> is a way to do that.  Is iconvlist(3) support on Solaris?  Or must
> I fall back to `iconv -l`?

no, there's no such thing as iconvlist or iconv -l. 
And, as far as the documentation says, the whole iconv package in Solaris 
did not change since version 2.6, and it's going to be the same in version 9.
Thus, we can rely on ($^O eq 'solaris') condition. 

Actually, I suspect that the way Solaris does it is somehow the right way. 
For instance, the XML specification says that encoding string is case-sensitive, 
and UTF-8 is the right name, not utf-8.
See the paragraph 4.3.3 of http://www.w3c.org/TR/2000/REC-xml-20001006
See also http://www.iana.org/assignments/character-sets
Of course, omitting the dash between "ISO" and "8859" is not the right way, 
and that's where Solaris specifics should be taken into account.

Regards, 
Stan



More information about the Rt-devel mailing list