I have a String that has non ascii characters encoded as “\\’fc” (without quotes), where fc is hex 252 which corresponds to the german ü umlaut.
I managed to find all occurences and can replace them. But I have not been able to convert the fc to an ü.
"fc".hex.chr
gives me another representation…but if I do
puts "fc".hex.chr
I get nothing back…
Thanks in advance
PS: I’m working on ruby 1.9 and have
# coding: utf-8
at the top of the file.
Have you tried
Ruby docs:
UPDATE:
Jason True is right.
fcis invalid UTF-8. I have no idea why my example works!