I am trying to infer a German setting containing the letter "ü" in escaped form (ascii 252, octal 374, hex 0xfc) using the following code:
pp "Test \374"
pp "Test \374".encode("UTF-8")
But using ruby 1.8.7 I get: "Test \ 374" "Test \ 374"
Using ruby 1.9.2 outputs: "Test \ xFC" "Test \ xFC"
How can I get ruby (1.8.7 + 1.9.x) to output "Test ü"? :)
source
share