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

Hi monks, I have a problem, i have a string like this :

coût supplémentaire

because it keeps on printing something like this:

créer une entrée

and I want to parse it, so my system can print it,could anyone tell me how to do it?

Replies are listed 'Best First'.
Re: Parse a special symbol
by hippo (Archbishop) on Jun 06, 2013 at 15:36 UTC

    You are about to enter the painful world of unicode. I'd suggest you brew a strong pot of coffee and dive into perlunitut. Good luck.

      Is there no other way? because i dont see that page will give me a help

        Sure there is. Hire a programmer.
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re: Parse a special symbol
by stefbv (Priest) on Jun 07, 2013 at 08:38 UTC

    You have to provide more information in order for any of us to be able to respond.

    From where does the string come from?

    • a file? (the encoding is UTF-8, iso-8859-1, ...?);
    • user input?;
    • embeded in the source of the script? (a label maybe?);

    The operating system you use?

    Regards, Stefan

      basically its just a variable

      my $rest = "l'événement";

      I tried to print that variable and what i get is a big mess

        1. Set your text editor to save things as utf-8 (if not already set so)
        2. use utf8;
        3. set your output encoding correctly: binmode(STDOUT, ":encoding(utf-8)");
        The rest depends on your terminal.
Re: Parse a special symbol
by Anonymous Monk on Jun 07, 2013 at 08:51 UTC