Last active
December 15, 2015 01:19
-
-
Save vladimir-e/5178828 to your computer and use it in GitHub Desktop.
The only way I managed to convert german text from latin1-swedish-ci to be able to use in ruby #ruby #encoding #utf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
puts oldproduct.title | |
# => Gestänge Stahl lang für Tarps (240cm) | |
i = Iconv.new('LATIN1','UTF-8') | |
new_title = i.iconv(oldproduct.title).force_encoding("UTF-8") | |
puts new_title | |
# => Gestänge Stahl lang für Tarps (240cm) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment