in reply to French Accents in perl

What OS are you using? What version of Perl? What sort of tool do you use to view the data correctly? Are you using that same tool to view the Perl output?

If you have written a perl script yourself, please post it if it's fairly short. (If it's really long, try to show us a short script that demonstrates the same problem with your data.) If you are using a script that you downloaded from somewhere, can you tell us where you got that?

Do you know enough about character encodings to tell us what encoding is used by your input data? I would suggest trying to post a relevant sample of data with accents, but I'm not sure how reliable that would be (the data might get altered in a variety of ways that might be beyond your control) -- still, that might be worth a try.

Come to think of it, I wonder if the "bad" characters I see in your post are the ones you intended: I'm seeing U+00DE ("capital letter thorn") and U+2554 ("box drawings double down and right", which is typically 0xC9 in the old DOS code pages). You can look up unicode code points and get other useful info on encodings at http://www.unicode.org.

Anyway, it's hard for us to say what should be done until you give us more information (code and data).

Replies are listed 'Best First'.
Re^2: French Accents in perl
by audoushka (Novice) on Nov 01, 2007 at 20:40 UTC
    See below for the code and data. Thanks.