Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

MacRoman <->Latin1

by axelrose (Scribe)
on Jul 20, 2002 at 15:02 UTC ( #183601=perlquestion: print w/replies, xml ) Need Help??

axelrose has asked for the wisdom of the Perl Monks concerning the following question:

Dear monks,

I wanted to use Perl modules to cleanly convert between MacRoman and Latin1 texts.

After some reading in the new Perl & XML book I thought I could use Unicode::String. It includes all utf variants and latin1 but no macroman.

The next module checked was XML::Encoding. It contains a lot of mappings but also lacks a macroman encoding.

I could of course write my own translation table but rather utilize standard maps and modules, i.e. macroman->utf8->latin1 would be the perfect solution.

Has anybody already solved this task?

Thanks,
Axel

Replies are listed 'Best First'.
Re: MacRoman <->Latin1
by Courage (Parson) on Jul 20, 2002 at 16:10 UTC
    I just looked at perl-5.8.0 source distribution and found ./ext/Encode/ucm/macRoman.ucm, which makes me think that:
    • it is supported in 5.8.0
    • Encode module from CPAN will help you with elder perls
    • at least that file will help you to write your own table (which is obviously not a best way)

    Courage, the Cowardly Dog.

      All "Encode" versions need at least 5.7 ...
        You're right. But still, there's right encoding file in there, which can help you.

        Another my guess is Unicode-Map-0.112 from CPAN. It contains .\Map\MS\MAC\Roman.map, which may be what you're searching for.

        Courage, the Cowardly Dog.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://183601]
Approved by virtualsue
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2020-03-29 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (171 votes). Check out past polls.

    Notices?