Strange characters in 'product names' for Create XLS option

  • Posts: 29
  • Thank you received: 1
  • Hikashop Essential
3 years 1 month ago #331179

-- HikaShop version -- : 4.4.1 (build 21-03-24)
-- Joomla version -- : 3.9.25
-- PHP version -- : 7.4.15
-- Browser(s) name and version -- : Firefox 86.01

Hi
I'm getting strange characters in the XLS created by the Create XLS mass action. They appear in the 'Product Name' and 'Product Page Title' columns and maybe others but I haven't chosen to write any other columns yet. See attached screen grab of the XLS columns.

They to do not appear in the backend screens, the products have mostly been created by adding them to an 'exported' Products menu CSV and then re-importing via the same option.

Why are they there? Can I remove them? They don't appear if I change the mass action file type from XLS to CSV.
Nor do they appear if I 'export' the products to a CSV via Products menu export option.

Seems to be linked to XLS format only? I'm using LibreOffice on a Mac to open the XLS/CSVs
Thanks

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
3 years 1 month ago #331187

Hi,

I suppose these are accented characters.
This must mean that you don't open the file with UTF8. I'm not sure if there is an option for that with you open a XLS with libreoffice ? Could you provide a copy of the file so that I could try openning it out on my end to confirm whether the issue is in the file or in the way the file is openned ?

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 1
  • Hikashop Essential
3 years 4 weeks ago #331223

Hi

I can't find a way to open an XLS in another character set with LibreOffice, it simply opens and I can't see anything on the menus to convert.
If I open a CSV file I do get the chance to change the character set and UTF8 is the default.
I have attached the XLS but have Zipped it so I can attach it.

I guess the work around, if needed, is to create as an CSV, open it and save it as an XLS (which does seem to work).
But good to know about the file though.

Edit: I have now managed to get my old XP VM running that has Xcel installed and the mass actions created XLS opens with the same characters as in LibreOffice. So maybe they are in the XLS? See what you can find out.

Thanks v much

Attachments:
Last edit: 3 years 4 weeks ago by Day. Reason: Further information has been acquired which could help.

Please Log in or Create an account to join the conversation.

  • Posts: 81515
  • Thank you received: 13069
  • MODERATOR
3 years 4 weeks ago #331226

Hi,

I digged a bit and the issue is that apparently, the BIFF5 format we use to generate the XLS files doesn't support UTF8:
stackoverflow.com/questions/20999380/php...8-character-encoding
Here is a zip of the file administrator/components/com_hikashop/helpers/spreadsheet.php that I've modified to use BIFF8 as recommended on that link:

File Attachment:

File Name: spreadsheet.zip
File Size:2 KB

Try replacing the file and doing tests if you really want XLS files. I tested it on my end and the accents then worked correctly on libreoffice calc after that change. However, after that change I wasn't able to open the XLS at all with Excel...
So I'm not sure doing that change is a good idea.

Attachments:
Last edit: 3 years 4 weeks ago by nicolas.

Please Log in or Create an account to join the conversation.

  • Posts: 29
  • Thank you received: 1
  • Hikashop Essential
3 years 4 weeks ago #331296

Thanks for investigating. I see what you mean. I'll make a note of this but for the future but maybe the simplest option is for me to simply open the CSV file in LOffice and save it as XLS if I really want an XLS.

The following user(s) said Thank You: nicolas

Please Log in or Create an account to join the conversation.

Time to create page: 0.076 seconds
Powered by Kunena Forum