Dropping non-utf8 support in v11 or v12

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by sholzy)
#564 (In Topic #164)
I'd be interested in other people's opinions, so please chime in…

0002515: Drop non-utf8 (non-unicode) support - Composr CMS feature tracker

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by PDStig)
#565
Anything that is a performance improvement I'm always for. If it makes the footprint smaller, that's a plus. Since UTF-8 has pretty much become a standard, it looks like a no-brainer to me.

What would be interesting is how many v9 and earlier installs are not using utf8. And of those, how many are not able to switch (and why?) to utf8 when moving to v10.


Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by sholzy)
#604
Hmm… IF you can make a tool in the upgrader to change all of the needed values to UTF, then sure, go for it. Otherwise no.

Why do I say no? Simple, you will lose a chunk of your users who do not want to go through the 'complicated' process of changing the characterset just to upgrade the CMS. Composr is not quite popular enough yet to not feel the hurt of it being dropped (or worse, ocPortal never being upgraded) just because the procedure to change charset isn't user friendly enough.

Some might say "Well if they can't do it themselves with the instructions posted, then maybe Composr isn't for them", but from what I can tell Composr is striving to become more user friendly, not less. The only not-so-user friendly part of the whole upgrade process from ocPortal 9 was the changing the charset to UTF. In fact, I decided not to do that and added the string for my test upgrade.

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by sholzy)
#605
That's a good point. Maybe we can make some special utility for it. The problem is that there's no set of MySQL commands that can do it, as it'll just complain about character set mismatches… so it needs to be done via full dumping and reimporting, which is prone to timeouts, particularly on large databases. So if we do make a tool, it'd need to be a command line one or incredibly smart at running across multiple refreshed web requests.

Post

Posted
Rating:
#631
Yeah, I'm a DB Admin major and I can confirm there's no simple MySQL SQL command to do it. You'd have to have the tool run the MySQL command for each table and the database, as each table would have to be ran separately.

There is a MySQL command line command though that MIGHT work…

Code

DB="dbname"
(
    echo 'ALTER DATABASE `'"$DB"'` CHARACTER SET utf8 COLLATE utf8_general_ci;'
    mysql "$DB" -e "SHOW TABLES" --batch --skip-column-names \
    | xargs -I{} echo 'ALTER TABLE `'{}'` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;'
) \
| mysql "$DB"

Of course since it uses xargs, that command would likely not work if the site is hosted on a windows server.

Post

Posted
Rating:
#633
I didn't know of "CONVERT TO CHARACTER SET", interesting.
2 guests and 0 members have recently viewed this.