View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
14646Bug reportsImport/Exportpublic2020-03-11 14:13
Reporterrealitix Assigned Tocdorin  
PrioritynoneSeveritypartial_block 
Status closedResolutionunable to reproduce 
Product Version3.15.x 
Summary14646: Encoding error when importing a survey
Description

Hello,

I got an error when I try to import a survey exported from version 2.0.5.
It's an encoding error in the group name.
The error in invisible with mysql so you have to use PGSQL to see it.

When you enable convert links, it works because the group name pass through preg_replace with the /u PCRE modifier and that fixes the UTF8 string.

I'm sending the pull request.

Steps To Reproduce
  1. Import the joined .lss file and set convert links to NO
  2. ERROR
TagsNo tags attached.
Attached Files
Bug heat8
Complete LimeSurvey version number (& build)master 3.15.9
I will donate to the project if issue is resolvedNo
Browser
Database type & versionPostgresql
Server OS (if known)
Webserver software & version (if known)
PHP Version0

Users monitoring this issue

There are no users monitoring this issue.

Activities

realitix

realitix

2019-03-13 16:03

reporter   ~50950

The SQL Exeption is the same as this bug: https://bugs.limesurvey.org/view.php?id=14133

realitix

realitix

2019-03-13 16:07

reporter   ~50951

Here the pull request: https://github.com/LimeSurvey/LimeSurvey/pull/1244

DenisChenu

DenisChenu

2019-03-13 16:27

developer   ~50953

Question : why only the group name ?
If groupname is not in UTF8 : why all other are in utf8 ?

realitix

realitix

2019-03-13 16:52

reporter   ~50955

Hello Denis,
I don't know exactly why, maybe an error in the exporter of version 2.05.
Maybe the check should be added to all fields but this bug only occurs with the group name.

dominikvitt

dominikvitt

2019-03-13 17:20

developer   ~50961

Last edited: 2019-03-13 17:21

It looks like proposed PR get rid of the SQL error, but it doesn't have any effect on group name.
It is the same for MySql or Postgresql.
I always get the following warning in import summary:
"Warnings:

Group “AAèAA 2 - AAAA-AAèAA 1 - AAAAAAAéA AA AAAAAAAAAA AAA AAAAAAAAAAAA AéAAAAéA AAA AAA AAAAAAAAAAAéA“ was set to ““ 

"
So, it looks like group name wasn't converted, but resorted to empty string.
I'm using Linux Mint, can it be because of OS difference?

DenisChenu

DenisChenu

2019-03-13 18:04

developer   ~50967

My issue is more :

  1. did this happen with a "not hacked" version of limesurvey (lss)
  2. If yes : we must «silently» fix
  3. If not : i think we must «inform user» there are an issue BUT : currently : no clean error can be done in import system …
dominikvitt

dominikvitt

2019-03-19 10:10

developer   ~51049

@realitix:
Do you have more information about this issue?
Do you also have warning when importing lss file?

dominikvitt

dominikvitt

2019-05-02 11:22

developer   ~51720

@realitix:
Any update on this issue?

realitix

realitix

2019-05-15 10:43

reporter   ~51942

Hello,

  • This issue only occurs when the group name is too long

Step to reproduce:

  • With limesurvey 2.0.5, create a survey and set the group name as "AAèAA 2 - AAAA-AAèAA 1 - AAAAAAAéA AA AAAAAAAAAA AAA AAAAAAAAAAAA AéAAAAéA AAA AAA AAAAAAAAAAAéA"
  • Create a question and export the survey as .lss file
  • Then, in limesurvey 3.x, import this .lss file and don't convert link.
  • Crash
DenisChenu

DenisChenu

2019-05-15 10:49

developer   ~51943

Last edited: 2019-05-15 10:50

Arg, usage of strlen and not mb_strlen (and mb_substr) : https://github.com/LimeSurvey/LimeSurvey/blob/b34f839d202ba0061412b5bd313d08e1d34d3309/application/helpers/admin/import_helper.php#L998

@realitix : can you check if it's fix the issue ?

realitix

realitix

2019-05-15 11:16

reporter   ~51944

I just tested on master and I still get an error:

CDbCommand n'a pas pu exécuter la commande SQL: SQLSTATE[22021]: Character not in repertoire: 7 ERROR: invalid byte sequence for encoding "UTF8": 0xc3 0x20

c_schmitz

c_schmitz

2020-03-11 14:13

administrator   ~56409

This version of LimeSurvey is not longer supported. Please check so that the issue is fixed in a more recent version of LimeSurvey. If it's not, reopen this bug report. Thank you.

Issue History

Date Modified Username Field Change
2019-03-13 16:03 realitix New Issue
2019-03-13 16:03 realitix File Added: limesurvey_survey_essai_2019011610000076.lss
2019-03-13 16:03 realitix Note Added: 50950
2019-03-13 16:07 realitix Note Added: 50951
2019-03-13 16:27 DenisChenu Note Added: 50953
2019-03-13 16:52 realitix Note Added: 50955
2019-03-13 17:20 dominikvitt Note Added: 50961
2019-03-13 17:21 dominikvitt Note Edited: 50961
2019-03-13 18:04 DenisChenu Note Added: 50967
2019-03-19 10:10 dominikvitt Note Added: 51049
2019-05-02 11:22 dominikvitt Note Added: 51720
2019-05-15 10:43 realitix Note Added: 51942
2019-05-15 10:49 DenisChenu Note Added: 51943
2019-05-15 10:50 DenisChenu Note Edited: 51943
2019-05-15 11:16 realitix Note Added: 51944
2019-11-26 17:50 cdorin Assigned To => cdorin
2019-11-26 17:50 cdorin Status new => assigned
2020-03-11 14:13 c_schmitz Status assigned => closed
2020-03-11 14:13 c_schmitz Resolution open => unable to reproduce
2020-03-11 14:13 c_schmitz Note Added: 56409