T
Thomas Luedeke
OK, I appreciate the feedback on my last post regarding pattern matching
accented French characters. But I am still not getting anywhere.
I'm running Ruby 1.9.2p0.
Here's the type of pseudo-code I want to use.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
variable =3D "exag=C3=A9rer"
if variable =3D~ /=C3=A9rer$/ then
print "the verb was #{variable}"
end
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
I've tried using jcode (which is apparently gone), -u extensions, having
the string # coding: UTF-8 at the beginning of the script, etc.
What I really want to do is read in a comprehensive list of verbs (with
various French accented characters), then have a simple I/O where I test
myself on a conjugation. So I need to be able to read, write, and
pattern match the accented characters.
What do I have to do to make this work?
TPL
-- =
Posted via http://www.ruby-forum.com/.=
accented French characters. But I am still not getting anywhere.
I'm running Ruby 1.9.2p0.
Here's the type of pseudo-code I want to use.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
variable =3D "exag=C3=A9rer"
if variable =3D~ /=C3=A9rer$/ then
print "the verb was #{variable}"
end
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
I've tried using jcode (which is apparently gone), -u extensions, having
the string # coding: UTF-8 at the beginning of the script, etc.
What I really want to do is read in a comprehensive list of verbs (with
various French accented characters), then have a simple I/O where I test
myself on a conjugation. So I need to be able to read, write, and
pattern match the accented characters.
What do I have to do to make this work?
TPL
-- =
Posted via http://www.ruby-forum.com/.=