How is the Czech "ch" letter stored in mysql and how to get it using substr?

Even “ch” appears in two letters, in Czechs it is considered one letter, and the order in the alphabet is considered the letter H (therefore, the correct order is a, b, c, d, e, f, g, h, ch, i, j (I missed some national characters.) But when I substr (colname, 1, 1) in a column containing words starting with ch Im, getting only "C"

this sql: SELECT SUBSTRING (title, 1, 1) AS title_truncated FROM node node WHERE node.type in ('termin') GROUP BY title_truncated ORDER BY title_truncated ASC "

returns: A, B, C, D, E, F, G, H, I, J (so there is no ch).

Database

btw uses utf8_czech_ci

+3
source share
3 answers

Ch Unicode, digraph.

, . @Ladislav , mySQL, , .

, , , . , IF, "Ch" , .

: utf8_czech_ci (mySQL 6)

+2

, ch , "" - . , .

MySQL , . . č (IIRC) c, ne , .

, , , easiet , substring title , , .

+2

title_truncated :

CASE SUBSTRING(title, 1, 2)
  WHEN 'ch' THEN SUBSTRING(title, 1, 2)
  ELSE SUBSTRING(title, 1, 1)
END AS title_truncated
+1

All Articles