View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
10697Bug reportsOtherpublic2018-09-28 14:12
Reporterdapster105 Assigned Toc_schmitz  
PrioritynormalSeveritypartial_block 
Status closedResolutionfixed 
Product Version2.06+ 
Fixed in Version2.06+ 
Summary10697: 4-byte UTF characters (e.g. Emojis) entered into free text causes database error on MySQL
Description

MySQL's utf8 data type does not support 4-byte utf8.

A survey respondent entering a 4-byte unicode character (such as an emoji or certain Asian characters) into a text response question will generate a database error and lose their survey response.

For MySQL v5.5.3 or later, the datatype utf8mb4 should be used for user-entered text. I don't know if this happens already? (I'm using MySQL 5.3)

For earlier versions of MySQL (there is a lot of old MySQL around), 4-byte characters should either be blocked from entry, or stripped/replaced before writing to the DB, or both.

Ideally limesurvey should detect the availability of the utf8mb4 datatype in a MySQL installation at runtime or via config switch and make use of it for new survey table creation. This would allow admins to upgrade MySQL and have limesurvey begin working for 4-byte utf-8 characters in all surveys created after that point.

Steps To Reproduce

Any limesurvey install using MySQL < 5.5.3 (only utf8 available).
Create a survey with a short text or long text question.
Switch the survey live (so it will try to write to the DB).
Complete the survey as a respondent and enter a 4-byte unicode character into the free text area.
(Get examples from http://www.i18nguy.com/unicode/supplementary-test.html)
Click submit / next.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)160129
I will donate to the project if issue is resolvedYes
BrowserChrome
Database type & versionMySQL 5.3
Server OS (if known)Windows Server 2008
Webserver software & version (if known)IIS 7
PHP Version5.3.19

Users monitoring this issue

There are no users monitoring this issue.

Activities

c_schmitz

c_schmitz

2016-03-07 11:20

administrator   ~36011

Fix committed to 2.06lts branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=17792

c_schmitz

c_schmitz

2016-03-07 11:21

administrator   ~36012

This is a hotfix for 2.06, filtering 4-byte, in 2.50 this is properly fixed and emojis can be stored.

dapster105

dapster105

2016-03-07 11:30

reporter   ~36013

Thanks Carsten,

Apologies I wasn't aware the fix had already been implemented - I did search but didn't find it.

Thanks greatly and I'll make a donation to the project now as promised.

c_schmitz

c_schmitz

2016-03-07 12:02

administrator   ~36054

Rather buy a Premium package here: https://www.limesurvey.org/services , in return you get a ComfortUpdate key and also get access to the 2.06LTS version

c_schmitz

c_schmitz

2016-03-16 09:20

administrator   ~36548

Version 2.06+LTS Build 160315 released

DenisChenu

DenisChenu

2018-09-28 14:12

developer   ~49172

Fix committed to 2.06lts branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&amp;id=28051

Related Changesets

LimeSurvey: 2.06lts cd30a75c

2016-03-07 10:19:55

c_schmitz

Details Diff
Fixed issue 10697: 4-byte UTF characters (e.g. Emojis) entered into free text causes database error/truncated text on MySQL Affected Issues
10697
mod - application/helpers/expressions/em_manager_helper.php Diff File

LimeSurvey: 2.06lts ea8c7bd4

2016-03-07 11:19:55

c_schmitz


Committer: DenisChenu Details Diff
Fixed issue 10697: 4-byte UTF characters (e.g. Emojis) entered into free text causes database error/truncated text on MySQL Affected Issues
10697
mod - application/helpers/expressions/em_manager_helper.php Diff File

Issue History

Date Modified Username Field Change
2016-03-07 11:00 dapster105 New Issue
2016-03-07 11:17 c_schmitz Assigned To => c_schmitz
2016-03-07 11:17 c_schmitz Status new => assigned
2016-03-07 11:20 c_schmitz Changeset attached => LimeSurvey 2.06lts cd30a75c
2016-03-07 11:20 c_schmitz Note Added: 36011
2016-03-07 11:20 c_schmitz Resolution open => fixed
2016-03-07 11:21 c_schmitz Note Added: 36012
2016-03-07 11:21 c_schmitz Status assigned => resolved
2016-03-07 11:21 c_schmitz Fixed in Version => 2.06+
2016-03-07 11:30 dapster105 Note Added: 36013
2016-03-07 12:02 c_schmitz Note Added: 36054
2016-03-16 09:20 c_schmitz Note Added: 36548
2016-03-16 09:20 c_schmitz Status resolved => closed
2018-09-28 14:12 DenisChenu Changeset attached => LimeSurvey 2.06lts ea8c7bd4
2018-09-28 14:12 DenisChenu Note Added: 49172