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

Hello,

I was just wondering if someone knew for sure how perl handles these characters internally.

Right now I have a perl script interacting through COM with .NET dlls and these characters are causing issues.

When I use the dashes in perl they transform into â?" and don't match when passed to the C# side. I'm trying to stay away from Encode if possible, but if there are any solutions feel free to let me know. Thanks!

Short code
my $adapterName = "MC8355 – Gobi(TM)"; $TM->SendRequest($adapterName, "","");
where $TM is win32::ole handle.

Replies are listed 'Best First'.
Re: Perl internal representation of em/endash?
by Corion (Patriarch) on Sep 27, 2013 at 16:23 UTC

    Even if you're trying to stay away from Encode, you will need to learn about the encodings of the characters in the sources, and what encodings the data sinks expect. Encode will then conveniently help you to transform the data from the source encoding to the sink encoding.