WebsiteBaker Community Forum
WebsiteBaker Support (2.10.x) => General Help & Support => Topic started by: rumen on September 11, 2017, 12:44:09 PM
-
With WB 2.10 I put minislider and the I want to use it in different laguages. With the English there is no issue, but with Cyrillic (Bulgarian) appeares only
???????????? ????? ??????????
instead of the text.
All other staff in Cyrillic is OK all over the website. Just in minislider I got that iproblem. How can I fix it?
Regards,
-
looks like a wrong charset / table collation for this file or database table.
Where do you have this output? minslider description under or of the picture? or somewhere else?
is is possible to give a example line from the database (if its a stored text) ? important is here the tablestructure as sql-backup
if this text comes from a language file or somewhere from a hardcoded changes inside of a file (example: a echo in view.php), maybe the file is saved with the wrong encoding method - must be saved as UTF8 without BOM
-
Look at the bottom of the picture here http://mktranslation.eu/pages/slider_test.php
-
looks, that the module in my locale testdomain doesnt work correctly, it doesnt save any settings, the database table is empty :-o :-o
i'll look at this
private hint: validate your template, maybe with W3C-Validator (https://validator.w3.org/nu/?doc=http%3A%2F%2Fmktranslation.eu%2F&showsource=yes)
a missing closing " at the end of this picture link can produce other errors in browsers with a stronger validation control (but has nothing to do with the char problem here)
<body background="http://mktranslation.eu/templates/mktranslation/images/l3.jpg>
-
Thanks a lot for the advices buddy, will fix that. But the issue with the text of the pictures comes from other place. Maybe I have to add somewhere in view.php UTF-8?
-
i work in locale test's with mysql-strict mode and in this mode, the add.php doesnt insert the entry for this section, because, there is no value for the field "texts" (our description)
if i work in non-strict-mode, everything works. the cyrillic letters are saved correctly in my database and the frontend display everything correctly in cyrillic letters,
(https://i.gyazo.com/931fdbfb11f96b9464ddc856f29c70f2.png)
so maybe something goes wrong at your server, please check the database table mod_minislider and here specially the structure like my picture (specially the collation - here the german word "Kollation" and the entry for this section (pic #2), specially the content of field "texts"
(https://i.gyazo.com/f94aa5e3e04ac63f144a72bd7723dd55.png)
(https://i.gyazo.com/db44f1ae6a6df8164422f2b79d0ca640.png)
do you change anything in the module like new nivoslider-javascript-files?
the view.php use htmlentities to "translate" special chars - red marked in my quote
foreach($images as $img) {
$text = isset($t[$i])? trim($t[$i]):'';
echo ' <img src="'.$baseurl.$curdir.basename($img['file']).'" data-transition="'.$transition.'" title="'.htmlentities($text).'" alt="" />';
$i++;
}
you can try it without htmlentities like
foreach($images as $img) {
$text = isset($t[$i])? trim($t[$i]):'';
echo ' <img src="'.$baseurl.$curdir.basename($img['file']).'" data-transition="'.$transition.'" title="'.$text.'" alt="" />';
$i++;
}
Maybe I have to add somewhere in view.php UTF-8?
we need to know first, what you use as table collation in this table. best way to found it out - export this table as sql-file, then we know, whats happend in the database. it looks for me like a different collation at the moment, maybe latin1_general
-
In the site Code table is UTF-8, in the host callation is utf8_general_ci and some modules have utf8_general_ci other have utf8_unicode_ci. I don't know if there is difference between utf8_general_ci and utf8_unicode_ci
-
The text field in module minislider in PHP admin is full with
?????????? ?????? ????????
????? ?? 1-???? ????????
????? ?? 2-???? ????????
????? ?? 3-???? ????????
????? ?? 4-???? ????????
I will try to cjange it there :)
-
And guess what ..... on the host minislider has collation - latin1_swedish_ci
-
The text field in module minislider in PHP admin is full with ........
its a translation problem, but dont use PHPmyAdmin to read the correct entry in sql-language. PHPmyAdmin is a browser and use the browser language settings to translate everything. if its not possible, to translate a char (maybe a unknow'n char are transmitted), the browser show's ???? for every char.
please use the sql-export, it show's the real entry in sql-language and without browser translation.
difference between utf8_general_ci and utf8_unicode_ci
i'm not expert for this. unicode is better in result sorting and general is a little bit faster. both collations are allowed, so it doesnt matter
And guess what ..... on the host minislider has collation - latin1_swedish_ci
you can change the collation to utf8_general_ci or utf8_unicode_ci and add the description again
-
Chaged collation, fixed and working!
Thanks a lot.
-
(Y) (Y) (Y)
thx for reply
P.S.:
i'm not sure, but i think, in the older wb-version's: if the module autor dont set the table collation and field collations in the module install, mysql use the default settings from this database. i have it on the german provider "strato" - there is latin1 the default collation for my database ( a old account)
newer modules or the wb-core since WB 2.8.3 SP6 use placeholders in sql-structure-files and utf8_unicode_ci as table collation then.