Method: JavaProperties::Encoding.decode
- Defined in:
- lib/java_properties/encoding.rb
.decode(string) ⇒ Object
Decodes a string by unescaping UTF-8 and special characters
29 30 31 32 33 34 35 |
# File 'lib/java_properties/encoding.rb', line 29 def self.decode string # Replace \uXXXX escaped chars with proper UTF-8 bytes string = Utf8.decode(string) # Replace \n escaped chars with proper characters string = SpecialChars.decode(string) end |