- Posts: 222
- Thank you received: 10
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
- Topic Author
- Offline
- Elite Member
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.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
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.
- krosser
- Topic Author
- Offline
- Elite Member
- Posts: 222
- Thank you received: 10
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.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
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.
- krosser
- Topic Author
- Offline
- Elite Member
- Posts: 222
- Thank you received: 10
I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
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.
- krosser
- Topic Author
- Offline
- Elite Member
- Posts: 222
- Thank you received: 10
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:
<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.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
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.
- krosser
- Topic Author
- Offline
- Elite Member
- Posts: 222
- Thank you received: 10
XSS security is disabled.
I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
- krosser
- Topic Author
- Offline
- Elite Member
- Posts: 222
- Thank you received: 10
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.
I'm using the latest LS 3.22 hosted on LS servers, not installed locally.
- DenisChenu
- Offline
- LimeSurvey Community Team
- Posts: 13935
- Thank you received: 2551
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.
- krosser
- Topic Author
- Offline
- Elite Member
- Posts: 222
- Thank you received: 10
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.