perl-unicode

Re: an api

2002-04-09 11:58:54
On Wed, Apr 10, 2002 at 03:52:33AM +0900, Dan Kogai wrote:
On Wednesday, April 10, 2002, at 03:46 , Jarkko Hietaniemi wrote:
Is there a simple user-level API for

    "I have a string that might be an encoding name,
     give me the canonical name"

e.g.

    Encode::foobar('latin1') eq 'iso8859-1'

If so (and I think there should be), Encode::Alias should probably tell
about it, not just about *defining* aliases.

It is already possible via

find_encoding("latin1")->name eq 'iso-8859-1';

but it's much more intuitive to add an API.   Any good name for it?  

Encode::Alias::resolve_alias(), to go with define_alias()?

Will be part of 1.32 that will be released soon.

Dan the Encode Maintainer

-- 
$jhi++; # http://www.iki.fi/jhi/
        # There is this special biologist word we use for 'stable'.
        # It is 'dead'. -- Jack Cohen

<Prev in Thread] Current Thread [Next in Thread>