Emoji: Incorrect string value: '\xF0\x9F\x98\x84' error

Anything about use of this forum : NOT about cycling
User avatar
admin
Site Admin
Posts: 1261
Joined: 14 Dec 2006, 8:27pm
Location: Lancing, West Sussex
Contact:

Emoji: Incorrect string value: '\xF0\x9F\x98\x84' error

Postby admin » 14 Apr 2015, 10:48am

Note: if you try to post a message and you get an error a bit like one of these:

Code: Select all

Incorrect string value: '\xF0\x9F\x98\x84' for column 'post_text' at row 1 [1366]
Incorrect string value: '\xF0\x9F\x98\x81' for column 'draft_message' at row 1 [1366]


then you probably inserted an "emoji" character (like a smiley face) from your tablet or phone's on-screen keyboard. The database cannot handle these special four-byte characters, yet.

We are investigating a fix for this.

Update: phpBB3 version 3.2 should be able to handle emoji characters. We're currently running phpBB 3.0, but hope to upgrade to 3.1 early in 2016, and to 3.2 as soon as we can (it is not yet released).

User avatar
gaz
Posts: 14162
Joined: 9 Mar 2007, 12:09pm
Location: Kent, lorry park of England

Re: Incorrect string value: '\xF0\x9F\x98\x84' error

Postby gaz » 16 Apr 2015, 10:04pm

Whilst I am well aware that I don't really understand these things, there are quite a number of emoji's displaying perfectly well on the forum.

Image Image Image Posted by cheating, I don't have an emoji enabled device :wink: .

Heltor Chasca is a frequent user.

Are some emoji more compatible than others?
There'll be tarmac over, the white cliffs of Dover ...

User avatar
admin
Site Admin
Posts: 1261
Joined: 14 Dec 2006, 8:27pm
Location: Lancing, West Sussex
Contact:

Re: Incorrect string value: '\xF0\x9F\x98\x84' error

Postby admin » 17 Apr 2015, 2:51pm

Those particular "emoji"s you posted aren't in fact unicode emoji characters, they're images provided by Tapatalk. Embedded images are always fine. :)

Real emojis are actual unicode text characters, not images. How they appear will depend on the glyph shapes defined by the font used to render the text. Many older Western fonts don't have glyphs defined for these Japanese emoji characters, but modern Android and iOS fonts now tend to.

Any emoji or character from the unicode character set that uses three bytes or fewer is fine. The problem only occurs for emojis that use four bytes per character.

Here's a handy reference list: http://apps.timwhitlock.info/emoji/tables/unicode

If you look in the "bytes" column you can see how many bytes the character uses by counting the "\xNN" sequences (each one represents a byte in hexadecimal notation). On this page you can see that the "emoticon" group are all four bytes, and thus not supported by this forum (yet). The dingbats group are OK, most of the others aren't.

User avatar
Graham
Moderator
Posts: 6489
Joined: 14 Dec 2006, 8:48pm

Do not use EMOJIs on this forum

Postby Graham » 5 Jan 2016, 12:14pm

. . . otherwise you may encounter this sort of persistent ERROR when you try to post

General Error
SQL ERROR [ mysqli ]
Incorrect string value: '\xF0\x9F\x98\x81' for column 'draft_message' at row 1 [1366]
An SQL error occurred while fetching this page. Please contact the Board Administrator if this problem persists.
Please notify the board administrator or webmaster: mbadmin@ctc.org.uk


Workaround is easy: do not use "emoji" characters.

Fix is very non-trivial, as it requires modifications to the database to
handle four-byte extended Unicode characters, which it doesn't by
default. Three bytes is plenty of every written language in the whole
world, and no-one thought we'd ever need four bytes until Apple picked
up the Japanese craze for emojis!

User avatar
Audax67
Posts: 4952
Joined: 25 Aug 2011, 9:02am
Location: Alsace, France
Contact:

Re: Do not use EMOJIs on this forum

Postby Audax67 » 5 Jan 2016, 1:38pm

Graham wrote:Three bytes is plenty of every written language in the whole
world, and no-one thought we'd ever need four bytes until Apple picked
up the Japanese craze for emojis!


Marketing, innit? No emojis = reduced sales in Japan. Craze + emojis = lolly.
Have we got time for another cuppa?

TonyR
Posts: 5390
Joined: 31 Aug 2008, 12:51pm

Re: Do not use EMOJIs on this forum

Postby TonyR » 5 Jan 2016, 2:25pm

:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :|

User avatar
Paulatic
Posts: 5721
Joined: 2 Feb 2014, 1:03pm
Location: 24 Hours from Lands End

Re: Do not use EMOJIs on this forum

Postby Paulatic » 5 Jan 2016, 4:14pm

TonyR wrote::D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :|

So I'm seeing them....but others aren't is this what's bring said?
Whatever I am, wherever I am, this is me. This is my life

https://stcleve.wordpress.com/category/lejog/
E2E info

User avatar
Graham
Moderator
Posts: 6489
Joined: 14 Dec 2006, 8:48pm

Re: Emoji: Incorrect string value: '\xF0\x9F\x98\x84' error

Postby Graham » 5 Jan 2016, 4:57pm

Er, like Anthony said above . . . . .

PS. I started a new topic because I could not find the existing one. The existing one is now a "sticky" . . maybe it always was . . . :oops:

User avatar
CREPELLO
Posts: 5558
Joined: 29 Nov 2008, 12:55am

Re: Emoji: Incorrect string value: '\xF0\x9F\x98\x84' error

Postby CREPELLO » 1 Dec 2016, 11:20pm

I just can't click emoji's. The cursor doesn't respond when hovered over them. Puter says 'smilies are on'.

User avatar
admin
Site Admin
Posts: 1261
Joined: 14 Dec 2006, 8:27pm
Location: Lancing, West Sussex
Contact:

Re: Emoji: Incorrect string value: '\xF0\x9F\x98\x84' error

Postby admin » 13 Dec 2016, 3:34pm

What web browser are you using? (Firefox, Internet Explorer, Chrome, Safari, Opera, Vivaldi, etc.)

When you click on a smilie on the right, you should get something like :D or :oops: added to the text. These get replaced by the smilie icon when you save.