Finding Chinese Characters in GBase 8a Using REGEXP
In the domestically developed GBase 8a MPP database, the REGEXP operator can locate rows containing Chinese characters, provided the column uses the UTF8mb4 character set. The article demonstrates two equivalent queries that return the same four matching rows from a seven-row test table mixing ASCII, digits and Chinese text. One approach writes the CJK character range directly into the SQL, which depends on the client connection carrying those bytes correctly. The alternative encodes the same range as a hexadecimal UTF8mb4 byte sequence, keeping the SQL pure ASCII and avoiding encoding issues in shells, scripts or drivers. The author notes the hex form is the safer default in such cases, though it is less readable and should be accompanied by a comment explaining the decoded range.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in