[Solved] Special Char validation with repeat group or bad collation

georgie

Member
Hello

Please it seems "Replace" on special char validation does not work with repeat group.
Indeed my joined table is not in the same collation.

Is it related ? I have tried some settings, without success (Force collation...).
Do you know that, or is me and my settings?

Thanks
 
Hello

Thanks. For example I try to replace "?" by "À".

My main table is in "utf8_general_ci", no problem for its fields.

But my joined table is in "latin1_swedish_ci", plugin does not work for her.

Thanks in advance
 
Yeah, I have a feeling latin1_swedish_ci isn't going to work with that plugin, as we use a simple str_replace(), which is only "safe" for UTF8.

To handle non-UTF8, the plugin would have to be written to use things like mb_detect_encoding(), and then setting the encoding, and using things like mb_ereg_replace().

Can you change the encoding on that table?

Note that just setting the default encoding doesn't work to change existing tables, you have to specifically convert the table with something like ...

ALTER DATABASE your_table_name CHARACTER SET utf8 COLLATE utf8_general_ci

-- hugh
 
OK

Thanks but I think I can not change the encoding table. Indeed it is a third-part DB, which point toward other tools.

Please what do you advice to me? Are there legitimate reasons for staying in latin1_swedish_ci encoding?
 
Are there legitimate reasons for staying in latin1_swedish_ci encoding?

None that I can think of. I strongly suspect it is only in that encoding because MySQL happened to have that as the default when installed. MySQL was originally written by a Swedish company, and the default was set before multibyte encoding became common. So unless you are actually using the Swedish language and don't need UTF8 multibyte encoding, then there are actually good reasons NOT to use it, and change the encoding to something sensible (like utf8_general_ci).

If for some bizarre reason they really can't change the encoding, I could probably work out a way of getting the specialchars validation to work, but it would incur hourly development costs (probably about an hour).

-- hugh
 
OK many thanks!

Thanks also for your interesting proposition (dedicated development), I note, but with your advices I can ask to third-part tool developers why this collation, and certainly we will change it for utf8_general_ci.

Thanks again
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top