Nuralanur
1/30/2006 11:25:00 PM
When I read in a text with accents from a file under cygwin, these get
converted to something like '\352'.
You can then search for these using regexps:
a="un texte extrêmement énervant"
p splitted_text=a.split(/(?=)/)
b=/extr\352mement/
d=a.match(b)
p d[0] => extr\352mement
When I write the result to a file, it appears correctly as "extrêmement".
f=File.new("t.txt",'w')
f.puts d[0]
f.close
Hope that helps,
Best regards,
Axel