I just found I have 2 sorts of cedillas coming from my PostgreSQL database in my Ruby code.
Both are displayed the same way in my website and webapp. My only problem is when I compare the strings, they are not equal.
What's the best Ruby way to replace the second one by the first one ? All my website and database are UTF-8. I already use a custom method to replace "non latin" chars, and did things like that for teh space for example:
# various kinds of space characters
"\xc2\xa0" => " ",
"\xe2\x80\x80" => " ",
"\xe2\x80\x81" => " ",
"\xe2\x80\x82" => " ",
Is there a code or ascci code like this for the second cedilla ?
EDIT: In fact, I found the cedilla difference by comparing strings in a ruby loop. What I just want was to list some strings, and break the loop when next string is different. My problem is Ruby trust the string to be different, event if it's the same at display. Any workaround ?
In this example, the 2 strings starting by "uniq_" are the same at display, but just comparing them with the "!=" operator, Ruby thinks they are not the same due to the encoding issue. Is there a way to bypass that ?