Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

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?


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\, which may be what you're searching for.

        Courage, the Cowardly Dog.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2023-12-10 19:22 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (41 votes). Check out past polls.