Created
June 7, 2013 18:16
-
-
Save olore/5731268 to your computer and use it in GitHub Desktop.
trying to do string concatenation with UTF-8 (arabic in this case) characters
This file contains hidden or 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
# encoding: utf-8 | |
# See http://stackoverflow.com/questions/16989935/ruby-concat-strings-with-utf-8-characters-results-in-strange-ordering | |
arabic = "أَبْجَدِيَّة عَ" | |
puts "A #{arabic} end " + " Goodbye " #This is OK because it starts with A | |
puts "#{arabic} end " + " Goodbye " #" end" is displayed first :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment