Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

"Text display" question type character limit for Cyrillic languages

  • krosser
  • krosser's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 6 months ago #174480 by krosser
Hi guys,

I've run into an unexpected character limit for the text display while adding translations for the English language. Apparently, when you use Cyrillic languages, then the text display cuts down the length of the text used in the question. It's roughly 3700-3800 characters.

I wonder if it's possible to overcome this limit somehow? Because I haven't run into that in English yet.

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago - 5 years 6 months ago #174482 by DenisChenu
No real limit is set. Limit is by sql server…

db type is text, mediumtextfor mysl: dev.mysql.com/doc/refman/5.7/en/blob.html and utf8 number take more place than ansi char.

3700 is very low, seems strange …

A TEXT column with a maximum length of 16,777,215 (224 − 1) characters. The effective maximum length is less if the value contains multibyte characters. Each MEDIUMTEXT value is stored using a 3-byte length prefix that indicates the number of bytes in the value.


PS : if you use Quick translation : it can happen because quick translation send ALL data in one shot … not related to cyrillic

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 years 6 months ago by DenisChenu.
The topic has been locked.
  • krosser
  • krosser's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 6 months ago #174485 by krosser
I hope we are talking about the same type of question..

I just copy/paste into HTML source my HTML table from DataTables. The HTML code (translation) is a mix of ANSI and UTF8 characters. But mostly UTF8/Cyrillic... And when I save the question, the text is cut off.

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
Attachments:
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #174492 by DenisChenu
Can you send a txt file OR a bin ( github.com/PrivateBin/PrivateBin/wiki/PrivateBin-Directory ) with your text ?

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The following user(s) said Thank You: krosser
The topic has been locked.
  • krosser
  • krosser's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 6 months ago #174697 by krosser
Hey Denis, did you have a chance to check the issue? I'd sent you a PM with a bin text.

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago #174698 by DenisChenu
Why using private message … :/ i'm not only one on this forum and anyone can test …

Else : no issue BUT i remove all the starting part : fresclan.free.fr/?1803225172bdd744#m+ZeG...6hSjJ80by4LRUnmrHOU=


This is surely this part was broke. And more : text end with a open td , no td and tbody and table close. Then : html broken.

I added it too …

The text you want to copy paste is totally html broken, not related to cyrillic

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
The topic has been locked.
  • krosser
  • krosser's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 6 months ago - 5 years 6 months ago #174700 by krosser
Well, you wrote if I can send it, so I thought you meant a PM. I don't want to post that text here. Otherwise, I'd need to use some sort of generic text instead.
I'm sorry but for some reason the text was cut in the bin. That's why there was no ending of the table (</td>, </tbody> and </table>)... I didn't check it properly. My bad. :pinch:
The starting part is actually extra, what I use elsewhere.

This is the format that I use in "text display" for the English language:
Code:
<script>
$(document).ready(function() {
    $('#example').DataTable( {
        "paging":   false,
        columns: [
          { width: '20%' },
          { width: '80%' }
        ],
        } );
} );</script>
<link href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.css" rel="stylesheet" type="text/css" /><script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.10.19/js/jquery.dataTables.js"></script>
<table class="hover row-border order-column" id="example" style="width:100%">
  <thead>
    <tr>
      <th>1st column</th>
      <th>2nd column</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1st column text...</td>
      <td>2nd column text...</td>
    </tr>
 
</tbody>
</table>

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
Last edit: 5 years 6 months ago by krosser.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 6 months ago - 5 years 6 months ago #174701 by DenisChenu
With fixed HTML : i add whole in my setup. Then i really don't think it's related to utf8 : master.sondages.pro/312326

Maybe you have XSS security enable, and since a lot od forbidden with XSS security …

PS : OK for private message, send is «send here» ;)

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 years 6 months ago by DenisChenu.
The topic has been locked.
  • krosser
  • krosser's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 6 months ago - 5 years 6 months ago #174708 by krosser
The HTML text ends exactly where it is cut off. So, to check it properly just double the code and see if it is cut afterwards.

XSS security is disabled.

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
Last edit: 5 years 6 months ago by krosser.
The topic has been locked.
  • krosser
  • krosser's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 5 months ago #174778 by krosser

DenisChenu wrote: With fixed HTML : i add whole in my setup. Then i really don't think it's related to utf8

Maybe you have XSS security enable, and since a lot od forbidden with XSS security …

PS : OK for private message, send is «send here» ;)


Denis, please remove the link to the text from your last post.
And the issue is related to UTF8. I have tested it using the lorem ipsum Cyrillic text, generated here .
The "text display" only takes up to ~36249 utf8 characters and then cuts everything above that. So, my HTML text containing UTF8 is cut because it's ~71000 characters.
Thus, there is a limit for UTF8 in that question type.

File Attachment:

File Name: limesurvey...4517.lss
File Size:78 KB

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
5 years 5 months ago - 5 years 5 months ago #174786 by DenisChenu
In bytes : text size are 2^16 ,
If you use utf8 with only 4 bits character it do 2^14 : 16 384

Maybe : you can try replacing text by longtext directly in DB
2^32 > 2^30 : 1 073 741 824 character only 4 bytes utf8

Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member, professional service on demand , plugin development .
I don't answer to private message.
Last edit: 5 years 5 months ago by DenisChenu.
The topic has been locked.
  • krosser
  • krosser's Avatar Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
5 years 5 months ago - 5 years 5 months ago #174787 by krosser

DenisChenu wrote: In bytes : text size are 2^16 ,
If you use utf8 with only 4 bits character it do 2^14 : 16 384

Maybe : you can try replacing text by longtext directly in DB
2^32 > 2^30 : 1 073 741 824 character only 4 bytes utf8


I cannot edit the DB since I'm using the LS hosted. If you know how it's done, please let me know...
What I can do now is use a workaround - insert an IFrame into the text display and link an external webpage that contains complete Cyrillic text.

I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
Last edit: 5 years 5 months ago by krosser.
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose