View Issue Details

This bug affects 1 person(s).
 8
IDProjectCategoryView StatusLast Update
14063Bug reportsSurvey takingpublic2019-05-23 12:26
Reportermedhat Assigned Toc_schmitz  
PrioritynoneSeveritypartial_block 
Status closedResolutionduplicate 
Product Version3.13.x 
Summary14063: Arabic text is corrupted in several sections in admin view and user view
Description

Arabic text shows as question marks in several parts of the survey:

  • text entered "Short free text" or "Long free text" text boxes
  • Welcome page
  • Survey description
  • Email template

Although that Arabic text is fine in other parts like: survey title and short free text data.

Steps To Reproduce

Reproduce 1:

  • create new survey
  • add Arabic language as an additional language in "General settings"
  • enter some arabic text in the survey's description & welcome message
  • save
    you will find that the arabic text turned into question marks.

Reproduce 2:

  • add a question of type: "short free text" or "large free text"
  • activate the survey
  • add one participant
  • try answering the survey by entering some arabic text for the question above
  • click submit
  • try to view your response details in Responses page in admin view
    you will find that the arabic text is showing as question marks.
TagsNo tags attached.
Attached Files
arabic problem1.png (45,175 bytes)   
arabic problem1.png (45,175 bytes)   
Bug heat8
Complete LimeSurvey version number (& build)Version 3.14.8+180829
I will donate to the project if issue is resolvedNo
Browserchrome Version 68.0
Database type & versionMS sql server 2012
Server OS (if known)windows 10
Webserver software & version (if known)IIS
PHP Versionphp 7.0 & php 5.6.30

Relationships

duplicate of 13904 closedc_schmitz Japanese characters get replaced with '?' 

Users monitoring this issue

efingdmi

Activities

efingdmi

efingdmi

2018-09-17 14:37

reporter   ~49063

similar to 13904

DenisChenu

DenisChenu

2018-09-17 18:50

developer   ~49066

Surely related to mssql, can not reproduce on mariadb

medhat

medhat

2018-09-23 08:08

reporter   ~49110

As per this note from microsoft: https://docs.microsoft.com/en-us/sql/relational-databases/collations/collation-and-unicode-support?view=sql-server-2014
All (char, varchar, and text) fields should be converted to: (nchar, nvarchar, and ntext) to support unicode text.

Also, as mentioned in the following link , text & ntext data types will be removed in future versions of sqlserver, so LS should use nvarchar(max) instead.
https://docs.microsoft.com/en-us/sql/t-sql/data-types/ntext-text-and-image-transact-sql?view=sql-server-2017

screenshots from both links are attached.

Note: changing db collation to arabic, instead of default sql_latin, seems to be working on sql server 2016 as it changes all varchar/text fields to nvarchar/ntext.

sqlserver1.png (44,826 bytes)   
sqlserver1.png (44,826 bytes)   
sqlserver2.png (63,222 bytes)   
sqlserver2.png (63,222 bytes)   
DenisChenu

DenisChenu

2018-09-28 10:50

developer   ~49162

Last edited: 2018-09-28 10:52

At creation : we use https://github.com/LimeSurvey/LimeSurvey/blob/master/installer/create-database.php#L31 text for text

Maybe needed as ntext ?
https://docs.microsoft.com/en-us/sql/t-sql/data-types/ntext-text-and-image-transact-sql?view=sql-server-2017

Unsure of the way to set it as ntext in Yii : https://github.com/yiisoft/yii/blob/master/framework/db/schema/mssql/CMssqlSchema.php#L31

Edit :
Found this

  1. https://github.com/yiisoft/yii/issues/614
  2. http://www.robertprice.co.uk/robblog/using-sql-server-ntext-columns-in-php/ didn't know without freetds
efingdmi

efingdmi

2018-10-17 07:09

reporter   ~49344

Will there be a fix for creation?

efingdmi

efingdmi

2018-11-06 12:11

reporter   ~49551

Any news here? As I can see the root cause has been found. What are the possibilites now for a windows installation? I couldn't find a way to set ntext... :(

Issue History

Date Modified Username Field Change
2018-09-17 14:14 medhat New Issue
2018-09-17 14:14 medhat File Added: arabic issue in welcome msg & survey description.png
2018-09-17 14:14 medhat File Added: arabic problem1.png
2018-09-17 14:36 efingdmi Issue Monitored: efingdmi
2018-09-17 14:37 efingdmi Note Added: 49063
2018-09-17 18:50 DenisChenu Note Added: 49066
2018-09-23 08:08 medhat File Added: sqlserver1.png
2018-09-23 08:08 medhat File Added: sqlserver2.png
2018-09-23 08:08 medhat Note Added: 49110
2018-09-28 10:50 DenisChenu Note Added: 49162
2018-09-28 10:52 DenisChenu Note Edited: 49162
2018-10-17 07:09 efingdmi Note Added: 49344
2018-10-18 09:50 c_schmitz Assigned To => c_schmitz
2018-10-18 09:50 c_schmitz Status new => assigned
2018-11-06 12:11 efingdmi Note Added: 49551
2019-05-23 12:26 c_schmitz Relationship added duplicate of 13904
2019-05-23 12:26 c_schmitz Status assigned => closed
2019-05-23 12:26 c_schmitz Resolution open => duplicate
2021-08-02 21:32 guest Bug heat 6 => 8