View Issue Details

IDProjectCategoryView StatusLast Update
15662Bug reportsSurvey takingpublic2019-12-19 17:20
ReporterDenisChenu Assigned ToDenisChenu  
PrioritynoneSeverityminor 
Status closedResolutionfixed 
Product Version3.21.2 
Fixed in Version3.21.2 
Summary15662: Non utf8 caracter save as ????? in DB
Description

With IIS and sqlsrv : question text is OK for Russian or Arabic.

Steps To Reproduce

Find a IIS + sqlsrv, Import include survey , enter «Просим Вас обосновать свои ответы и (или) проиллюстрировать их примерами:» in the text,

Move next/submit : check response : ?????

Additional Information

Check SQL request with debugsql : seems OK

CREATE TABLE [lime_survey_799727] ( [id] int IDENTITY PRIMARY KEY NOT 
NULL, [submitdate] datetime NULL, [lastpage] int NULL, [startlanguage] 
nvarchar(20) NOT NULL, [seed] nvarchar(31) NULL, [799727X1290X16208]
 nvarchar(max) NULL )
UPDATE lime_survey_799727 SET [lastpage]=1, [799727X1290X16208]=' Просим
 Вас обосновать свои ответы и (или) проиллюстрировать их примерами: ' 
WHERE ID=1
TagsNo tags attached.
Complete LimeSurvey version number (& build)3.21.2
I will donate to the project if issue is resolvedNo
Browsernot relevant
Database & DB-VersionSQLServerVersion: 12.00.6293 / sqlsrv
Server OS (if known)windows
Webserver software & version (if known)IIS
PHP Version7.2.12

Activities

DenisChenu

DenisChenu

2019-12-16 17:13

developer  

DenisChenu

DenisChenu

2019-12-16 17:14

developer  

DenisChenu

DenisChenu

2019-12-16 17:14

developer   ~55048

lsr broken too

DenisChenu

DenisChenu

2019-12-16 17:29

developer   ~55049

Last edited: 2019-12-16 17:32

View 2 revisions

NOT a DB limitation : update via SQL maganement studio is OK

Update via Admin Data entry : it's OK

DenisChenu

DenisChenu

2019-12-16 17:51

developer   ~55050

The only difference between online and data edit seems PDO usage ?

DenisChenu

DenisChenu

2019-12-16 17:55

developer  

MSSQLsettings.png (127,072 bytes)
jelo

jelo

2019-12-17 12:29

partner   ~55051

Isn't the replacement with ? indented by the administrator of the system?

PDO::SQLSRV_ENCODING_SYSTEM Data is 8-bit characters as specified in the code page of the Windows locale that is set on the system. Any multi-byte characters or characters that do not map into this code page are substituted with a single-byte question mark (?) character.
https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server?view=sql-server-ver15

If there is a issue (LS;PHP,Windows), you might first check what kind of SQLDriver for PHP is installed.
https://docs.microsoft.com/en-us/sql/connect/php/download-drivers-php-sql-server?view=sql-server-ver15

DenisChenu

DenisChenu

2019-12-17 13:43

developer   ~55052

Isn't the replacement with ? indented by the administrator of the system?

?

Update via

  1. Limesurvey Admin Data entry : it's OK
  2. Limesurvey online survey : it's KO

:)

jelo

jelo

2019-12-17 13:53

partner   ~55053

I see. That would limit it to a certain SQL query inside LimeSurvey. If it only occurs answering a survey and retrieving answers on the next page. Tricky.

DenisChenu

DenisChenu

2019-12-17 14:22

developer   ~55054

Last edited: 2019-12-17 14:23

View 3 revisions

No,

Not retrevieng answer : retrievening is done via $_SESSION

UPDATE lime_survey_799727 SET [lastpage]=1, [799727X1290X16208]=' Просим Вас обосновать свои ответы и (или) проиллюстрировать их примерами: ' WHERE ID=1 : ?????? is saved
UPDATE lime_survey_799727 SET [lastpage]=:lastpage, [799727X1290X16208]= :param WHERE ID=1 with [ … Вас обосновать свои ответы и (или) проиллюстрировать их примерами is saved :)

I check : Move from
Yii::app()->db->createCommand($query)->query();
to
Response::model($this->sid)->findByPk($_SESSION[$this->sessid]['srid'])->update();
fix the issue

(bu i need less update on this commit)

DenisChenu

DenisChenu

2019-12-17 14:44

developer   ~55055

Seems the 5.3, i check with 5.5

DenisChenu

DenisChenu

2019-12-17 15:55

developer   ~55057

Moving to sqlsrv 5.6+ didn't fix the issue

DenisChenu

DenisChenu

2019-12-17 16:38

developer   ~55058

https://github.com/LimeSurvey/LimeSurvey/pull/1353

DenisChenu

DenisChenu

2019-12-17 16:53

developer   ~55059

Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=29289

DenisChenu

DenisChenu

2019-12-17 17:55

developer   ~55060

Thanks :)

lime_release_bot

lime_release_bot

2019-12-19 17:20

administrator   ~55098

Fixed in Release 3.21.3+191219

Related Changesets

LimeSurvey: master 27957d68

2019-12-17 16:53:19

DenisChenu


Committer: c_schmitz Details Diff
Fixed issue 15662: Some UTF-88 characters saved as ????? in DB when using MSSQL and IIS (#1353) Affected Issues
15662
mod - application/helpers/expressions/em_manager_helper.php Diff File
mod - application/helpers/frontend_helper.php Diff File

Issue History

Date Modified Username Field Change
2019-12-16 17:13 DenisChenu New Issue
2019-12-16 17:13 DenisChenu File Added: Capture d’écran du 2019-12-16 17-12-26.png
2019-12-16 17:14 DenisChenu File Added: survey_archive_brokenRussian.lsa
2019-12-16 17:14 DenisChenu Note Added: 55048
2019-12-16 17:29 DenisChenu Note Added: 55049
2019-12-16 17:32 DenisChenu Note Edited: 55049 View Revisions
2019-12-16 17:51 DenisChenu Note Added: 55050
2019-12-16 17:55 DenisChenu File Added: MSSQLsettings.png
2019-12-17 12:29 jelo Note Added: 55051
2019-12-17 13:43 DenisChenu Note Added: 55052
2019-12-17 13:53 jelo Note Added: 55053
2019-12-17 14:22 DenisChenu Note Added: 55054
2019-12-17 14:23 DenisChenu Note Edited: 55054 View Revisions
2019-12-17 14:23 DenisChenu Note Edited: 55054 View Revisions
2019-12-17 14:44 DenisChenu Note Added: 55055
2019-12-17 15:55 DenisChenu Note Added: 55057
2019-12-17 16:38 DenisChenu Note Added: 55058
2019-12-17 16:53 c_schmitz Changeset attached => LimeSurvey master 27957d68
2019-12-17 16:53 DenisChenu Note Added: 55059
2019-12-17 16:53 DenisChenu Assigned To => DenisChenu
2019-12-17 16:53 DenisChenu Resolution open => fixed
2019-12-17 17:55 DenisChenu Status new => resolved
2019-12-17 17:55 DenisChenu Fixed in Version => 3.21.2
2019-12-17 17:55 DenisChenu Note Added: 55060
2019-12-19 17:20 lime_release_bot Note Added: 55098
2019-12-19 17:20 lime_release_bot Status resolved => closed