MySQL treats ÅÄÖ as AAO?

Yes, this is standard behaviour in the non-language-specific unicode collations. 9.1.13.1. Unicode Character Sets To further illustrate, the following equalities hold in both utf8_general_ci and utf8_unicode_ci (for the effect this has in comparisons or when doing searches, see Section 9.1.7.7, “Examples of the Effect of Collation”): Ä = A Ö = O Ü = U … Read more

How to explain sorting (numerical, lexicographical and collation) with examples to non technical testers?

Here are some explanations: Lexicographical In this case, you sort text without considering numbers. In fact, numbers are just “letters”, they have no numeric combined meaning. This means that the text “ABC123” is sorted as the letters A, B, C, 1, 2 and 3, not as A, B, C and then the number 123. This … Read more

Illegal mix of collations error in MySql

Here’s how to check which columns are the wrong collation: SELECT table_schema, table_name, column_name, character_set_name, collation_name FROM information_schema.columns WHERE collation_name=”latin1_general_ci” ORDER BY table_schema, table_name,ordinal_position; And here’s the query to fix it: ALTER TABLE tbl_name CONVERT TO CHARACTER SET latin1 COLLATE ‘latin1_swedish_ci’; Link

determining the character set of a table / database?

You can check the version using SELECT @@VERSION; It it’s 9.00 or greater, you can check the collation of a column using SELECT collation_name FROM sys.columns WHERE name=”column name” AND [object_id] = OBJECT_ID(‘dbo.table name’); And for the database using SELECT collation_name FROM sys.databases WHERE name=”database name”; If it’s < 9.0 then you’re using SQL Server … Read more

Using JavaScript to perform text matches with/without accented characters

There is a way to ““deaccent” the string being compared” without the use of a substitution function that lists all the accents you want to remove… Here is the easiest solution I can think about to remove accents (and other diacritics) from a string. See it in action: var string = “Ça été Mičić. ÀÉÏÓÛ”; … Read more