Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emojis #26

Closed
renzotom opened this issue Jan 10, 2018 · 5 comments

Comments

Projects
None yet
3 participants
@renzotom
Copy link

commented Jan 10, 2018

Hello, when I use emoji in Rian editor and after wanna do poll, it is broken, if there is emoji on source... When in source is ex. : dolpin :, it works, but when there is 馃惉 it is broken....
`Hello, on new version 3.2.2 and database importing (from 3.2.1), I can't make polls.....

[code]
General error
SQL ERROR [ mysqli ]

Incorrect string value: '\xF0\x9F\x90\xB3 \xC2...' for column 'post_text' at row 1 [1366]

SQL

INSERT INTO phpbb_ppr (post_edit_user, post_id, post_edit_time, post_subject, post_text, bbcode_uid, bbcode_bitfield, post_edit_reason) VALUES ('2', 379, 1515609720, 'Delf铆ni', '[attachment=1]1.14_delf铆ni.png[/attachment]\n\nUr膷it臎 mnoz铆 z V谩s v铆, 啪e nov谩 verze [b]1.14 [/b]a pro Bedrock edici [b]1.3 [/b]p艡inese tak茅 [b]delf铆ny [/b] 馃惓 . Poj膹me si o nich n臎co v铆ce 艡铆ci.... Co v拧e o nich teda v铆me? Samoz艡ejm臎 to nebudou 啪谩dn铆 zabij谩ci, ale zcela m铆rumilovn谩 stvo艡en铆, tedy [b]pasivn铆 tvorov茅[/b]. Tito roztomil铆 tvorov茅 budou um臎t [b]sk谩kat z vody a zp谩tky do vody[/b], budou nav铆c u啪铆vat [b]syst茅m chyt艡ej拧铆ho sk谩k谩n铆[/b], na kter茅m pracuje v媒voj谩艡 [url=https://twitter.com/MiaLem_n]MiaLem_n[/url], kter媒 pro n谩s u啪 p艡ipravil nap艡. papou拧ky a recepty. \n\nhttps://twitter.com/MiaLem_n/status/950667415976804352\n\n[i]Co 艡铆k谩te na tuto schopnost p艡eskakovat r暖zn茅 v臎ci do vody? Nebudete si je moci chytit n臎kde bl铆zko mo艡e 膷i zastaven铆m proto啪e to p艡esko膷铆 [/i] 馃槣 .\n\nKrom toho v铆me ji啪 z Mineconu, 啪e n谩s budou [b]vodit k vrak暖m s poklady.[/b]\n\n[attachment=0]1.14_vraky.png[/attachment]\n\nTo u啪 je t茅m臎艡 v拧e, te膹 si 艡ekneme, co rozhodn臎 od delf铆n暖 ne膷ekat... N谩拧 v媒拧e zm铆n臎n媒 v媒voj谩艡 toti啪 rozhodn臎 艡ekl, 啪e delf铆ny [b]nebude mo啪n茅 艡铆dit[/b]. Pro膷? PROTO沤E TO JE T脻R脕N脥 ZV脥艠AT!!! A ani v MC v媒voj谩艡i necht臎j铆 podporovat t媒r谩n铆 zv铆艡at, co啪 je nejsp铆拧 dob艡e.\n\nhttps://twitter.com/MiaLem_n/status/951003168758001664\n\n[offtopic]A nep艡谩tel拧t铆 mobov茅 zase nikde :([/offtopic]\n\n[i]Co na delf铆ny 艡铆k谩te? L铆b铆 se V谩m tito nov铆 tvorov茅? Co byste jim p艡idali?[/i]', '22rxmwtk', '', '')

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 993
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 193
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/ext/bruninoit/ppr/event/main_listener.php
LINE: 177
CALL: phpbb\db\driver\factory->sql_query()

FILE: (not given by php)
LINE: (not given by php)
CALL: bruninoit\ppr\event\main_listener->edit_action()

FILE: [ROOT]/vendor/symfony/event-dispatcher/EventDispatcher.php
LINE: 184
CALL: call_user_func()

FILE: [ROOT]/vendor/symfony/event-dispatcher/EventDispatcher.php
LINE: 46
CALL: Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()

FILE: [ROOT]/phpbb/event/dispatcher.php
LINE: 62
CALL: Symfony\Component\EventDispatcher\EventDispatcher->dispatch()

FILE: [ROOT]/phpbb/event/dispatcher.php
LINE: 46
CALL: phpbb\event\dispatcher->dispatch()

FILE: [ROOT]/includes/functions_posting.php
LINE: 1498
CALL: phpbb\event\dispatcher->trigger_event()

FILE: [ROOT]/posting.php
LINE: 1445
CALL: submit_post()[/code]

PS: In next topic, I can make it.... Maybe there is problem with post? Ex. with emotions from Rin editor?`

@martec

This comment has been minimized.

Copy link
Owner

commented Mar 14, 2018

Hi,

you tried to do same thing without my extension?

@renzotom

This comment has been minimized.

Copy link
Author

commented Mar 17, 2018

Yeah, try it yourself also.

@martec

This comment has been minimized.

Copy link
Owner

commented Mar 17, 2018

?
I asked result when you tried without my extension. Same thing happen or not?

@Leinad4Mind

This comment has been minimized.

Copy link

commented Apr 30, 2018

Your problem is in here: https://github.com/andreaskou/phpbb3.2_post_revisions/blob/master/event/main_listener.php#L167

That happens because an UTF-8 has 4-bytes but in MySQL it has only 3-bytes, but on most recent MySQL I beleive its already fixed. You can read more here: https://tracker.phpbb.com/browse/PHPBB3-11711

One solution is to put this:
'post_text' => preg_replace('/[\x{10000}-\x{10FFFF}]/u', '\xef\xbf\xbd', $event['data']['message']),

And other variables if you think someone will add an emoji on the subject or on the reason field.

Another solution is to put this:
https://www.phpbb.com/community/viewtopic.php?f=456&t=2450106&start=15#p14971426

Cheers

@martec

This comment has been minimized.

Copy link
Owner

commented Dec 29, 2018

Thanks @Leinad4Mind .
so not related with my extension. so closed.

@martec martec closed this Dec 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.