LEN(non-English)

SELECT LEN('France');

The code above produces “6”.
But the code below produces " Error in SQL" because it contains non-English.

SELECT LEN('Français');

How can I get the length of non-English?
The followig is one of my trials for it, but failed.

SELECT mb_LEN('Français', 'utf8');

for your last thread, you were using MySQL

unless you say otherwise, i will assume that you’re still using MySQL

there is no LEN function in MySQL

please, choose one of the valid ones (there are two) – String Functions and Operators

$key='ais'; $like="%$key%";
$sql="SELECT id, contents FROM myTable
WHERE contents like ?";

The code above produces the result below.

When I change the key from “$key=‘ais’” to “$key=‘ça’”, it procuces the result below.

I think that record (3) and record (6) should not be retrieved because they don’t have the key “ça”.

How can I produces my target result below with the key “ça”?

again, i refer you to da manual Character Sets and Collations in General

What character sets and collations are availabe?
I think utf-8 character sets and collations should be available.
I don’t know how to set utf-8 to it.

please read the rest of that chapter

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.