Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

French Characters and PERL

Status
Not open for further replies.

mgp77

Programmer
Nov 25, 2005
52
CA
Hello,
I'm trying to write a search and replace program in PERL that will replace all instances of a string with french characters with a new string which also containcs french characters. The only problem is it appears that when perl extracts the string from the text file it misinterprets some of the chars. For example the string Année courante when extracted from the file comes out as AnnÚe courante. My regular expression looks like

m/([ \w',àéôâçêëèûùî–"ÀÁÂÃÄÅÈÉÊËÌÍÎÏ’:.()\/-]+)/

Any help is appreciated!
 
Do you use any encoding module while you parsing your strings?
can you attach your script instead of posting cause I recieve double utf8 encoded characters.


``The wise man doesn't give the right answers,
he poses the right questions.''
TIMTOWTDI
 
Another obvious question is, what encoding are you using?
Latin1 or UTF8 or something else?
Are both the input and output supposed to be in the same enconding or are you switching encodings?


Trojan.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top