Forum


List Manager Support

List Manager support
Forums
Public write access is disabled. Please login

How to export list content with Chinse characters? 24.01.2012 03:15

I created a List with Chinese contents. It shows Chinese contents on the web site without problems. However, when I export my List to either pdf or Excel format, the Chinese contents do not show up instead showing with ?????. How can I show the contents with Chinese characters in pdf or Excel? Thanks.

Re: How to export list content with Chinse characters? 24.01.2012 17:58

Hello,
the default pdf library we distribute with list manager can't handle chinese characters. We are going to send you to your email a new library with instructions to overwrite at your site configured to output chinese/japanese/korean letters.
When we have this working, we can move forward to the excel issue, more related to the encoding, because no external libraries are used for that task.

Hope this helps you, best regards
Moonsoft Team
Moonsoft Team
www.moonsoft.es

Re: How to export list content with Chinse characters? 24.01.2012 20:27

Hello,
your mail server rejects the attached files, so we've decided to add an entrance to the versions download. Please login and enter the download page of your component, so you will see the pdf pack to download. Unzip it first and follow the instructions on the txt file.
The new files configure the output to print chinese characters, please check it if it works as expected.

Best regards
Moonsoft Team
www.moonsoft.es

Re: How to export list content with Chinse characters? 25.01.2012 05:35

My joomla folder is called joomla2 so I pasted the folder 'mpdf' to \joomla2\components\com_listmanager\views\listmanager folder and overwrited the 'pdf.php' at \joomla2\components\com_listmanager\views\listmanager\tmpl\ with the new version.

Now, when I click to export pdf, I only get a blank page. The previous version will ask me to save the pdf file to my local computer. However, the new version does not ask for where to save the pdf file. Did I make something wrong?

Re: How to export list content with Chinse characters? 25.01.2012 06:05

I reviewed the new pdf.php file and found the code:

$mpdf=new mPDF('+aCJK');

However, I did not see where you define the mPDF or include any php file from the "mpdf" folder. Am I missing something?

Re: How to export list content with Chinse characters? 25.01.2012 10:52

Hi,
sorry, but it's US who have missed something. We forgot one change, as you stated, the new library import. We've just updated the zip to download, if you want to edit the file, this is the only change:

\joomla\components\com_listmanager\views\listmanager\view.pdfr.php


At the beggining, you should replace the export library used, this way:

// require('fpdf.php');

require_once('mpdf/mpdf.php');


Thank you

Best regards
Moonsoft Team
www.moonsoft.es

Re: How to export list content with Chinse characters? 25.01.2012 16:24

The Chinese characters are now shown as square boxes.

Re: How to export list content with Chinse characters? 25.01.2012 21:57

Square boxes are usually related to the font used to print the characters. You can try to force the library to use a font able to print them. Please download again the pdf pack (hope this will be the last one) and overwrite the pdf.php file, it includes the style to use GB font, tested here and showed the chinese (simplified) without the boxes.

Hope this helps,
Moonsoft Team
www.moonsoft.es

Re: How to export list content with Chinse characters? 26.01.2012 01:17

The data contents show correct Chinese characters but the column titles still show as square boxes.

Re: How to export list content with Chinse characters? 26.01.2012 01:22

One more question. Is it possible to select which columns of data to export in front-end page? I like to collect many columns of data but only need to generate certain columns of data when export to pdf or Excel. Thanks.

Re: How to export list content with Chinse characters? 26.01.2012 13:27

Hello,
yes, the headers also should be forced to use the correct font (again at the pdf.php file). We changed this but we've realised it doesn't work well with single quotes, so it's changed now. We have uploaded the pack with changes to character encoding to get the excel output as well.

About your question, you have two options when exporting columns, export all of them, or only the columns marked as 'visible' at list configuration. Is a parameter you can find at module/component configuration called 'export all columns'.

If you want something more specific, then you may need to change the code, the pdf.php or excel.php files in order to select which of them you want to be printed.

Best regards
Moonsoft Team
Moonsoft Team
www.moonsoft.es

Re: How to export list content with Chinse characters? 26.01.2012 18:27

The PDF file is now correctly showing Chinese characters. Thanks. However, the Excel file does not show correctly. Here is one of the content.

"?∪??撣?/td>"

It shows not only the garbage code but also with "/td>". Can you check your php code for exporting to Excel format again. Sorry for bothering you so much.

Re: How to export list content with Chinse characters? 26.01.2012 20:40

Hi,
it's ok, we are very interested in having this working too, so you're not bothering at all :)
Here we were getting a different output for excel, don't know exactly the reason, so we've changed again the excel part to some different encoding. Hope this works for you as well, please let us know if it finally shows up the correct symbols.

Best regards
Moonsoft Team
www.moonsoft.es

Re: How to export list content with Chinse characters? 27.01.2012 04:04

Everything works great except the List name which I also have Chinese characters. On the PDF format, I know how to modify to show Chinese characters in the List name but I don't know how to make the Excel changed.

Re: How to export list content with Chinse characters? 27.01.2012 10:58

Hello,
great, seems we've got the point. So, in excel file (excel.php), you have the title printed at this line:


echo $this->title;

Please comment it and add a new one to get the correct encoding for the title string, this way:


//echo $this->title;
echo mb_convert_encoding($this->title, "HTML-ENTITIES","UTF-8");



That sould do the work, is same treatment is done to the rest of list data.

Best regards

Edited by MSTeam - 30.01.2012 16:01
Moonsoft Team
www.moonsoft.es

Re: How to export list content with Chinse characters? 28.01.2012 00:54

It works when I add "echo" in front of "mb_convert_encoding($this->title, "HTML-ENTITIES","UTF-8");". Everything is now working perfectly. Thanks again.

Re: How to export list content with Chinse characters? 30.01.2012 10:45

Yes, the editor wrapped the line, now it reads ok.

Also the download at user section includes this title issue fixed.

Thank you, best regards
Moonsoft Team
www.moonsoft.es
Are you satisfied with our products/services/support?
Please help us to keep improving, add a review at  joomla extensions site and  magento connect

Our clients' feedback