Register - Login
Views: 95140506
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
09-18-18 11:04:42 PM

Jul - Meta - Bug: Emoji cause the relevant text to get truncated New poll - New thread - New reply
Next newer thread | Next older thread
Xkeeper

Level: 244


Posts: 21911/23358
EXP: 228465836
For next: 1721430

Since: 07-03-07

Pronouns: they/them, she/her, etc.

Since last post: 1 day
Last activity: 47 min.

Posted on 12-24-16 09:34:30 PM Link | Quote
Example: If you post "Someone once told me that pushing Start gave them 🐾, which is the second worst joke I've heard today", the post will terminate at "...Start gave them". The remaining content is completely lost and unrecoverable.

This is because MySQL's UTF8 encoding isn't actually UTF8. Surprise!

The fix is to upgrade MySQL and use the fancy "utf8_mb4" (or w/e), but shared hosting. I'll check and see if it's available yet. I know it wasn't when I did the big Unicode conversion a few months ago

You can get around this by using html entities. Since they're stored as the HTML entity (ampersand, numbers, semicolon) they save (and display) just fine.
Sanqui
1750
🦉
Level: 77


Posts: 1482/1750
EXP: 4137827
For next: 53302

Since: 12-20-09

Pronouns: any
From: Czechia (NEW!)

Since last post: 2 days
Last activity: 18 hours

Posted on 12-25-16 04:51:08 AM Link | Quote
Originally posted by Xkeeper
You can get around this by using html entities. Since they're stored as the HTML entity (ampersand, numbers, semicolon) they save (and display) just fine.

You can get around this in this way, too. As in, if utf8_mb4 was found unavailable, we could just convert all astral plane Unicode characters to HTML entities before sticking them in the database.
Xkeeper

Level: 244


Posts: 21917/23358
EXP: 228465836
For next: 1721430

Since: 07-03-07

Pronouns: they/them, she/her, etc.

Since last post: 1 day
Last activity: 47 min.

Posted on 12-25-16 08:31:21 AM Link | Quote
That's true, but I'd rather just go the route of updating the database to actually handle unicode properly instead of hoping and praying I find all the various places I have to encode and decode the entities. Especially as some of them, like < and >, should probably not be decoded again.

It would be less trouble to just write a big ALTER. That way I could nail every field at once.
Next newer thread | Next older thread
Jul - Meta - Bug: Emoji cause the relevant text to get truncated New poll - New thread - New reply




Rusted Logic

Acmlmboard - commit 5d36857 [2018-03-03]
©2000-2018 Acmlm, Xkeeper, Inuyasha, et al.

25 database queries.
Query execution time: 0.162505 seconds
Script execution time: 0.006249 seconds
Total render time: 0.168754 seconds
Memory used: 524288