Register - Login
Views: 87874623
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - JCS - Stats - Latest Posts - Color Chart - Smilies
12-17-17 08:52:47 AM

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






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
1590
🦉
Level: 73


Posts: 1482/1598
EXP: 3451386
For next: 34482

Since: 12-20-09
From: Czech Republic

Since last post: 19 hours
Last activity: 15 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






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 2f1bc75 [2017-08-27]
©2000-2017 Acmlm, Xkeeper, Inuyasha, et al.

25 database queries.
Query execution time: 0.164205 seconds
Script execution time: 0.004141 seconds
Total render time: 0.168345 seconds