N
Nicolas Gaiffe
Hi,
I am facing an issue with special characters handling inside a Ruby
script running on Windows and am sure some of you could help me on
this.
This script copies files such as "<English_name>.txt" to
"<Other_language_name>.txt". But once translated, the new filename may
have special characters. 'ä' for instance.
Running
puts 'ä'
in a Ruby script gives
'õ'
as an output, whereas the same code in irb gives
'ä'
There must be an encoding issue at some point in my script but I
didn't manage to fix it (tried different values of '#encoding:'
without success). Any clue ?
Many thanks in advance
Best regards
Nicolas
I am facing an issue with special characters handling inside a Ruby
script running on Windows and am sure some of you could help me on
this.
This script copies files such as "<English_name>.txt" to
"<Other_language_name>.txt". But once translated, the new filename may
have special characters. 'ä' for instance.
Running
puts 'ä'
in a Ruby script gives
'õ'
as an output, whereas the same code in irb gives
'ä'
There must be an encoding issue at some point in my script but I
didn't manage to fix it (tried different values of '#encoding:'
without success). Any clue ?
Many thanks in advance
Best regards
Nicolas