Languages not appearing in CMS correctly but are in database correct

7 posts by 2 authors in: Forums > CMS Builder
Last Post: March 26, 2020   (RSS)

By Twocans - September 17, 2019

Hi yea,
I have a table (Table type is InnoDB ) I have multi languages in that table, when I view my db using navicat all is fine, but when I view the chinese etc in the cms wow the text appears as gobbledygook, see imagine attached.

Thanks for any input

Kenny

Attachments:

2019-09-17-12_11_11.png 116K

By Twocans - September 17, 2019

I believe the issue stems from the CMS as it is the latest download cmsbuilder_3_53_build2265_release, and I see it creates the tables as InnoDB and no longer as MYISAM as it did in the other cms I have used.Both the InnoDB and the MYISAM have the collation value utf8mb4_unicode_ci

In the past when I built multilingual I was able to use the MYISAM no bother. wow, if you can give me any tips on what I can set with the cms for the new InnoDB I would be grateful.


cheers

Kenny

By daniel - September 17, 2019

Hi Kenny,

To my knowledge, the MyISAM vs. InnoDB shouldn't have a big impact on character encoding, so this is a curious issue. You mentioned in a previous thread that you were dealing with importing/exporting data - is that the case here? If so, is there anything different in your import/export process from when it worked previously? 

Let me know and I can hopefully offer some steps for troubleshooting.

Thanks,

Daniel
Technical Lead
interactivetools.com

By Twocans - September 18, 2019

Hi yea,

I am very grateful for your help

I have the files here I did video screen capture plus the .ini.php etc thus kinda explaining a little my issue.

http://www.yellspace.co.uk/interactivetools-export-import-datatype-issue.zip

i have tried the simple export and then using import plugin but that didn't work if with me dragging over the .ini.php 

I have tried upteam ways doing it with navicat but always the gobblygook is there rather than languages. The only thing I feel is causing this is the table types have changed , I aim to specialise in multilingual thus want to be able to perfect my import export of specific parts aka iso codes etc. So I would be happy to know I can do this using either the import export plugin or wow navicat. 

Anyway I am grateful for ay input.

cheers

kernny

By daniel - September 23, 2019

Hi Kenny,

Thanks for the detailed documentation! I believe I've narrowed down the issue to a setting in the CSV Import plugin. This line in csvImport.php:

  'ENCODING'              => 'CP1252', // CP1252, ASCII, ISO-8859-1, UTF-8 - More: http://php.net/manual/en/mbstring.supported-encodings.php

Can be changed to use UTF-8:

  'ENCODING'              => 'UTF-8', // CP1252, ASCII, ISO-8859-1, UTF-8 - More: http://php.net/manual/en/mbstring.supported-encodings.php

After changing this, I was able to import your CSV (the one from Navicat) with the correct character set displaying in an InnoDB table.

Let me know if that helps, or if you have any more questions!

Thanks,

Daniel
Technical Lead
interactivetools.com

By Twocans - March 26, 2020

Thank you Daniel,
Ok sorry for very late reply but wow, i had another poke at it and, here is

When using navicat to export records, navicat does so using a Binary Data Encoding in a listmenu of Base64, (in step 4 of the navicat export wizard)..... anyway I change that to None and bingo, all is fine.

Hope you guys are all well

cheers

k