- Posts: 5
- Thank you received: 0
UTF8 import... å ä ö not working
-- HikaShop version -- : 2.2.2
-- Joomla version -- : 3.2.1
-- PHP version -- : 5.4.4
-- Browser(s) name and version -- : Firefox 26
-- Error-message(debug-mod must be tuned on) -- : Wrong signs for swedish å ä ö
I have an exported CSV wiht lots of products ... when I open it in Notepad ++ i looks fine. Swedish å ä ö are fine. But when I import it I get strange signs.
Is there anything that I need to do to get the correct UTF when importing?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
If you use notepad++ to open the file, you should see the characters fine.
So I would recommend you to contact the support of your CSV reader software for help on how to open a CSV file in UTF8 with their software.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
It's not gonna be easy but here is what you are looking for:
administrator/components/com_hikashop/views/product/tmpl/export.php
Look at the end of the file.
You could use the function change of encoding.php (in the helper folder).
But it's complicate while you could use something else to read your csv.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The HikaShop export system can create CSV or XLS files.
We do not support the XLSX file format.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
In the view "backend | your_backend_template | product | export" you will find this line:
I forgot that the option is an "hidden option", there is no visible interface in the HikaShop configuration for that because it is very specific feature.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
My products (photography) has English, French and Swedish characters for relevant products.
I thought the issue was with Open Calc which I use but it appears it is something within the system.
Here is my work through to test.
I have a product with the words Musée du Louvre in title, description etc:
If I export that product, save it without opening in any program see below
Please log in or register to see it.
Then if I import that file straight away (without opening it in any program); the accents for that phrase becomes (Musée du Louvre) - See below
Please log in or register to see it.
So while I have been pulling my hair out for a few hours thinking it was OpanCalc, it appears not to be the case. The same appears for Swedish words with accents.
Any thoughts on this greatly appreciated
Simon
Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Please Log in or Create an account to join the conversation.
HikaShop exports the CSVs with the UTF8 encoding which supports all the characters.
But I can see that your CSV already has characters with a wrong encoding in the hikashop-export-import-test.csv file : take.ms/UeMzo
That is already like that in your database and wasn't done by the export. You can see that the other accents display fine in your CSV.
So I'm thinking that the problem might be when you import the CSV. Did you select the UTF8 encoding when you did the import ?
Please Log in or Create an account to join the conversation.
Thanks for looking into this.
That erroneous character group is because I must have missed correcting that particular field (the alias) when I did the test.
Importing as utf8. - remember that file that I imported was unchanged from the export (i.e. not opened so whatever the encoding at export is the same at import.
The is something going on with the import but not sure what, why, how.
Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Please Log in or Create an account to join the conversation.
First image is the file with the exported product that with the accented characters corrected in the backend. You can see that in both OpenCalc and notepad that characters are as expected.
The second image is the product after the same file above is imported (unopened, unsaved, as it was exported)
Here is the file... there appears to be something happening on import. (Are you able to test import successfully)
Please log in or register to see it.
Strange...
Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Please Log in or Create an account to join the conversation.
If I copy the content of the csv into the 'Import products from text area', and import that way, it imports as expected (with correct accent characters)
So there appears to be a 'glitch' with the 'Import products from CSV' function - but we are getting closer to the issue.
Simon
Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Please Log in or Create an account to join the conversation.
So I've tried to import your CSV on a test website and the texts don't have any accent problem:
take.ms/aCZtC
And if I export again the product, the accents are still correct in the resulting CSV:
take.ms/nmwxy
So besides a wrong manipulation with the files on your end, I don't see what it could be.
Please Log in or Create an account to join the conversation.
Text import works fine; and when I export it, all accents display as expected.
It is the CVS (file) import which is causing the issue, as mentioned, that file, exported and then directly imported, remained untouched/unopened before re-importing it back in - and the issue appears.
I was thinking and investigating something erroneous in the mysql tables etc, but nothing comes up.
Doing the text import is no big deal, just a couple of clicks with the mouse.
Thanks again for looking into this Nicolas, appreciate it!
Simon
Don't look at what is and ask 'why?'; look at what isn't and ask 'Why Not!'
Please Log in or Create an account to join the conversation.