Register - Login
Views: 99393339
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
04-24-22 10:24:21 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

Level: 263


Posts: 21911/25343
EXP: 296722326
For next: 2238127

Since: 07-03-07

Pronouns: they/them/????????

Since last post: 9 days
Last activity: 3 days

Posted on 12-25-16 12:34:30 AM 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.

____________________
(Lv 232 with 190855118 EXP)
Sanqui
2060
💛🤍💜🖤🦉
Level: 87


Posts: 1482/2066
EXP: 6305069
For next: 87705

Since: 12-20-09

Pronouns: any ✨
From: Czechia | Estonia

Since last post: 6 days
Last activity: 1 day

Posted on 12-25-16 07:51:08 AM Link | Quote


*Sanky flops.

level 70

exp 2887757

exppct 12.3%

numposts 1482

 
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.

____________________
In our brief lives,  •  we've managed to meet.  •  Treasure this gift,  •  this precious time that we have.        
Xkeeper

Level: 263


Posts: 21917/25343
EXP: 296722326
For next: 2238127

Since: 07-03-07

Pronouns: they/them/????????

Since last post: 9 days
Last activity: 3 days

Posted on 12-25-16 11: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.

____________________
(Lv 232 with 190946093 EXP)
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 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

27 database queries.
Query execution time:  0.077460 seconds
Script execution time:  0.009946 seconds
Total render time:  0.087406 seconds


TidyHTML vomit below
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
line 2 column 301 - Warning: unescaped & or unknown entity "&page"
line 119 column 11 - Warning: <form> isn't allowed in <table> elements
line 118 column 10 - Info: <table> previously mentioned
line 120 column 11 - Warning: missing <tr>
line 120 column 119 - Warning: missing </font> before </td>
line 124 column 16 - Warning: plain text isn't allowed in <tr> elements
line 120 column 11 - Info: <tr> previously mentioned
line 125 column 68 - Warning: missing </nobr> before </td>
line 141 column 68 - Warning: missing </nobr> before <tr>
line 147 column 35 - Warning: missing <tr>
line 147 column 50 - Warning: missing </font> before </td>
line 148 column 37 - Warning: unescaped & or unknown entity "&id"
line 147 column 204 - Warning: missing </font> before </table>
line 149 column 35 - Warning: missing <tr>
line 149 column 50 - Warning: missing </font> before </td>
line 149 column 91 - Warning: missing </font> before </table>
line 156 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 158 column 9 - Warning: missing <tr>
line 176 column 13 - Warning: missing <tr>
line 177 column 102 - Warning: unescaped & or unknown entity "&postid"
line 179 column 74 - Warning: <style> isn't allowed in <td> elements
line 179 column 9 - Info: <td> previously mentioned
line 188 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 190 column 9 - Warning: missing <tr>
line 208 column 13 - Warning: missing <tr>
line 209 column 102 - Warning: unescaped & or unknown entity "&postid"
line 211 column 74 - Warning: <style> isn't allowed in <td> elements
line 211 column 9 - Info: <td> previously mentioned
line 211 column 613 - Warning: <style> isn't allowed in <td> elements
line 211 column 9 - Info: <td> previously mentioned
line 211 column 3831 - Warning: '<' + '/' + letter not allowed here
line 216 column 20 - Warning: '<' + '/' + letter not allowed here
line 216 column 34 - Warning: '<' + '/' + letter not allowed here
line 220 column 21 - Warning: '<' + '/' + letter not allowed here
line 234 column 1156 - Warning: discarding unexpected </div>
line 234 column 1162 - Warning: discarding unexpected </div>
line 234 column 1168 - Warning: discarding unexpected </td>
line 237 column 9 - Warning: <div> isn't allowed in <table> elements
line 152 column 17 - Info: <table> previously mentioned
line 239 column 9 - Warning: missing <tr>
line 257 column 13 - Warning: missing <tr>
line 258 column 102 - Warning: unescaped & or unknown entity "&postid"
line 260 column 74 - Warning: <style> isn't allowed in <td> elements
line 260 column 9 - Info: <td> previously mentioned
line 265 column 17 - Warning: missing <tr>
line 265 column 17 - Warning: discarding unexpected <table>
line 268 column 35 - Warning: missing <tr>
line 268 column 50 - Warning: missing </font> before </td>
line 268 column 91 - Warning: missing </font> before </table>
line 270 column 35 - Warning: missing <tr>
line 270 column 50 - Warning: missing </font> before </td>
line 271 column 37 - Warning: unescaped & or unknown entity "&id"
line 270 column 204 - Warning: missing </font> before </table>
line 272 column 17 - Warning: discarding unexpected </textarea>
line 272 column 28 - Warning: discarding unexpected </form>
line 272 column 35 - Warning: discarding unexpected </embed>
line 272 column 43 - Warning: discarding unexpected </noembed>
line 272 column 53 - Warning: discarding unexpected </noscript>
line 272 column 64 - Warning: discarding unexpected </noembed>
line 272 column 74 - Warning: discarding unexpected </embed>
line 272 column 82 - Warning: discarding unexpected </table>
line 272 column 90 - Warning: discarding unexpected </table>
line 274 column 9 - Warning: missing </font> before <table>
line 286 column 25 - Warning: discarding unexpected </font>
line 295 column 37 - Warning: discarding unexpected </font>
line 273 column 1 - Warning: missing </center>
line 120 column 63 - Warning: <img> lacks "alt" attribute
line 125 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 125 column 93 - Warning: <img> lacks "alt" attribute
line 141 column 19 - Warning: <td> attribute "width" has invalid value "120px"
line 141 column 98 - Warning: <img> lacks "alt" attribute
line 148 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 148 column 246 - Warning: <img> proprietary attribute value "absmiddle"
line 161 column 23 - Warning: <img> lacks "alt" attribute
line 161 column 64 - Warning: <img> lacks "alt" attribute
line 161 column 113 - Warning: <img> lacks "alt" attribute
line 161 column 163 - Warning: <img> lacks "alt" attribute
line 162 column 11 - Warning: <img> lacks "alt" attribute
line 172 column 15 - Warning: <img> lacks "alt" attribute
line 183 column 1500 - Warning: <img> proprietary attribute value "absmiddle"
line 183 column 1500 - Warning: <img> lacks "alt" attribute
line 192 column 16 - Warning: <img> proprietary attribute value "absmiddle"
line 192 column 16 - Warning: <img> lacks "alt" attribute
line 192 column 59 - Warning: <img> proprietary attribute value "absmiddle"
line 192 column 59 - Warning: <img> lacks "alt" attribute
line 192 column 102 - Warning: <img> proprietary attribute value "absmiddle"
line 192 column 102 - Warning: <img> lacks "alt" attribute
line 192 column 145 - Warning: <img> proprietary attribute value "absmiddle"
line 192 column 145 - Warning: <img> lacks "alt" attribute
line 193 column 22 - Warning: <img> lacks "alt" attribute
line 193 column 63 - Warning: <img> lacks "alt" attribute
line 193 column 112 - Warning: <img> lacks "alt" attribute
line 193 column 162 - Warning: <img> lacks "alt" attribute
line 194 column 11 - Warning: <img> lacks "alt" attribute
line 204 column 15 - Warning: <img> lacks "alt" attribute
line 242 column 23 - Warning: <img> lacks "alt" attribute
line 242 column 64 - Warning: <img> lacks "alt" attribute
line 242 column 113 - Warning: <img> lacks "alt" attribute
line 242 column 163 - Warning: <img> lacks "alt" attribute
line 243 column 11 - Warning: <img> lacks "alt" attribute
line 253 column 15 - Warning: <img> lacks "alt" attribute
line 260 column 901 - Warning: <div> anchor "xklayout" already defined
line 271 column 44 - Warning: <img> proprietary attribute value "absmiddle"
line 271 column 142 - Warning: <img> proprietary attribute value "absmiddle"
line 271 column 246 - Warning: <img> proprietary attribute value "absmiddle"
line 280 column 25 - Warning: <img> lacks "alt" attribute
line 285 column 267 - Warning: <img> lacks "alt" attribute
line 149 column 50 - Warning: trimming empty <font>
line 265 column 17 - Warning: trimming empty <tr>
line 268 column 50 - Warning: trimming empty <font>
line 125 column 68 - Warning: <nobr> is not approved by W3C
line 141 column 68 - Warning: <nobr> is not approved by W3C
line 177 column 27 - Warning: <nobr> is not approved by W3C
line 209 column 27 - Warning: <nobr> is not approved by W3C
line 258 column 27 - Warning: <nobr> is not approved by W3C
Info: Document content looks like HTML5
Info: No system identifier in emitted doctype
Tidy found 110 warnings and 0 errors!


The alt attribute should be used to give a short description
of an image; longer descriptions should be given with the
longdesc attribute which takes a URL linked to the description.
These measures are needed for people using non-graphical browsers.

For further advice on how to make your pages accessible
see http://www.w3.org/WAI/GL.
You are recommended to use CSS to specify the font and
properties such as its size and color. This will reduce
the size of HTML files and make them easier to maintain
compared with using <FONT> elements.

You are recommended to use CSS to control line wrapping.
Use "white-space: nowrap" to inhibit wrapping in place
of inserting <NOBR>...</NOBR> into the markup.

About HTML Tidy: https://github.com/htacg/tidy-html5
Bug reports and comments: https://github.com/htacg/tidy-html5/issues
Official mailing list: https://lists.w3.org/Archives/Public/public-htacg/
Latest HTML specification: http://dev.w3.org/html5/spec-author-view/
Validate your HTML documents: http://validator.w3.org/nu/
Lobby your company to join the W3C: http://www.w3.org/Consortium

Do you speak a language other than English, or a different variant of
English? Consider helping us to localize HTML Tidy. For details please see
https://github.com/htacg/tidy-html5/blob/master/README/LOCALIZE.md