Import CSV file in Arabic using Prestashop 1.6 - csv

I have a CSV file with a list of products and I'm trying to import them from back office.
My website include French and Arabic language.
I succeeded importing product in French but I'm having issue with Arabic language is give me name of product in interregation points :(
I'm using Prestashop 1.6.

Resolved
Hello finally i found the solution about issue the saved csv in UTF8 you can follow this steps:
1. In Microsoft Excel, open the *.xlsx file.
2. Select Menu | Save As.
3. Enter any name for your file.
4. Under "Save as type," select Unicode Text.
5. Click Save.
6. Open your saved file in Microsoft Notepad.
7. Replace all tab characters with commas (",").
Select a tab character (select and copy the space between two column headers)
Open the "Find and Replace" window (Press Ctrl+H) and replace all tab characters with comma .
8. Click Save As.
9. Name the file, and change the Encoding: to UTF-8.
10. Change the file extension from ".txt" to ".csv".
11. Click Save.
12. Open the .csv file in Excel to view your data.

Related

Magento 2.1.1 We can't find required columns: sku

My apologies if a solution has been provided elsewhere. I have searched and could not find anything similar to what I am experiencing. I am trying to upload categories on a Magento CE 2.1.1 website. I have a file with almost 4000 categories and sub categories and the only practical way is to upload via a csv file.
I downloaded a sample file to use and when I upload the same sample file it's working fine when I click Check data" button. However, when I replace the values on the rows with my own and save the file as csv with UTF-8 text encoding, I am getting an error message below. This is also happening when I save the file as csv even without changing the values. I have tested this with a csv file saved from both Mac Numbers and Windows Excel.
I only need to upload Categories (and not products) but I am not sure if this is possible.
File links:
Importing
Not importing
Actual project sample file
The files are quite similar but strangely one is working and the other is not.
Error
We can't find required columns: sku.
Column names: "sku;store_view_code;attribute_set_code;product_type;categories;product_websites;name;description;short_description;weight;product_online;tax_class_name;visibility;price;special_price;special_price_from_date;special_price_to_date;url_key;meta_title;meta_keywords;meta_description;base_image;base_image_label;small_image;small_image_label;thumbnail_image;thumbnail_image_label;swatch_image;swatch_image_label;created_at;updated_at;new_from_date;new_to_date;display_product_options_in;map_price;msrp_price;map_enabled;gift_message_available;custom_design;custom_design_from;custom_design_to;custom_layout_update;page_layout;product_options_container;msrp_display_actual_price_type;country_of_manufacture;additional_attributes;qty;out_of_stock_qty;use_config_min_qty;is_qty_decimal;allow_backorders;use_config_backorders;min_cart_qty;use_config_min_sale_qty;max_cart_qty;use_config_max_sale_qty;is_in_stock;notify_on_stock_below;use_config_notify_stock_qty;manage_stock;use_config_manage_stock;use_config_qty_increments;qty_increments;use_config_enable_qty_inc;enable_qty_increments;is_decimal_divided;website_id;related_skus;related_position;crosssell_skus;crosssell_position;upsell_skus;upsell_position;additional_images;additional_image_labels;hide_from_product_page;bundle_price_type;bundle_sku_type;bundle_price_view;bundle_weight_type;bundle_values;bundle_shipment_type;associated_skus" are invalid
This might be because you opened the file in Excel which will add a BOM to the start of the file. When the Magento importer tries to read the file, it expects the first header/cell to say sku, but it instead sees the BOM.
Two ways to solve this:
1) Don't open it in excel - use Google sheets, or a text editor if you are feeling brave,
2) If you opened the file in excel, close it, open it in notepad++, click encoding up the top and set to "Encode in UTF-8" (NOT "Encode in UTF-8-BOM"). Then save and you are good to go.

OpenOffice when exporting CSV underscores are replaced with "+AF8-"

I'm having issues with a Open Office. I'm trying to export some files as CSV text and it appears that underscores and perhaps some other characters are being replaced. For instance, I created this file in a text editor and saved it as test.csv:
"this_value","is_replaced"
I then opened the file into Open Office as a spreadsheet. It looked fine. Then I saved it as a new CSV file named test-export.csv. When I open the new file in a text editor, the underscores are replaced with "+AF8-", and the comma is replaced with a tab.
this+AF8-value is+AF8-replaced
This change makes the file useless for my purposes. Any idea what is causing this?
Apparently the problem is caused when you import the CSV file into Open Office. When you import it you have a choice which character set to use. I used UTF-7 when I should have used UTF-8. When I import using UTF-8, it then saves the file as I expect it should.

CodedUI test does not read data from CSV input file

I am having difficulty mapping a CSV file with the Coded UI test method. This is most likely a stupid question but I cannot seem to find a solution for my problem, at least not one that works. I have made sure to set the property of the CSV file to Copy always.
I have also imported the CSV file by writing the following line above the test method.
[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\Data\\login.csv", "login#csv", DataAccessMethod.Sequential), DeploymentItem("login.csv"), TestMethod]
The file name is login.csv and it resides in the Data folder.
The test will compile without any problem but once the test executes the fields that should receive input from the CSV file are left empty and the execution is interrupted. I've tried replacing the data from the CSV file by using Strings and it works perfectly fine. The piece of code I am using to import each parameter is:
TestContext.DataRow["Username"].ToString()
Also, the CSV file contains something along the following lines:
Username,Password,Fullname
admin#mail.com,password,Admin
Is there anyone who can point what it is I am forgetting.
Update: I pinpointed the issue, it seems like the issue only revolves around the first column in the csv file. When I try to import any of the other values it works perfectly fine.
Some text files start with a Byte Order Mark (BOM). The CSV reader within Coded UI does not handle the BOM and treats it as part of the first field name. The screen shot below shows the debug trace of a CSV file with a BOM and that same file shown in Notepad++. The DataRow.ItemArray[...] values are as expected. The DataRow.Table.Columns.ResultsView[...] shows the field names, but the first field name includes the BOM.
This CSV file with a BOM was created in Visual Studio using Solution Explorer => Add => New item => C# => General => Text file. Previously I have created a spread sheet with Microsoft Excel and saved it as a CSV file, that file did not have a BOM. I have also created files with Notepad++ and saved as CSV and they did not have a BOM. It appears that Visual Studio creates files with a BOM but when editing CSV files it does not add a BOM.
Visual Studio can create files with the correct encoding. Within "Step 2 - Create a data set" of this Microsoft page it states the text below. (Thanks also to Holistic Developer for providing very similar details in a comment.):
It is important to save the .csv file using the correct encoding. On the FILE menu, choose Advanced Save Options and choose Unicode
(UTF-8 without signature) – Codepage 65001 as the encoding.
For Visaul Studio 2010, i could solve issue be selecting "Western European (Windows) - Codepage 1252" encoding for CSV files.
Summary of steps:
In visual studio 2010, Open CSV file > Go to File menu > Select " Advanced Save Options" > Select "Western European (Windows) - Codepage 1252" > Save.
This should help.
This is not the best solution but its kind of a workaround. I simply set the first element to something random and since I don't need access to the first element it doesn't matter that I don't have access to it.
If anyone finds a correct way to solve this problem I'd be grateful for your solution.

CSV File showing random characteristics

I copied a file from my ipad using iFunBox and I tried opened it with:
Microsoft Excel
FreeFileViewer
Notepad
Notepad++
All of them shown nothing File (.csv) Everytime open it using those 4 programmes this is what I get:
] 1 ˆ&ÓMF.¶•J¡ ñßR)åÙ¥e
ò¦Øœsl\V{`¸u°N±vI¦½™êk4“‡-m Ùò¾ˆÚär'²ø¢å:š nàÊ#‹8yH#uä³éc‹übuÙÀÙHIˆ[g¿^¶$9¹asï³`‰;*ý:Ôê]ÓlÆFJŠzÆy l[
†nÒdzÙ› ™uê^ï:—ŽœÏ·`ð€‡°XR…Hù™6è³ß×+¥Û/‹ÐÉÞ‡çååw¿öùr~uóçˆKÝcýœó©û$R0áÓ)`´Á°ŠOŸ¸hÉw”ÕÌ$¾S|åÚ†G¾Ùú¿#/¯J(Ádž‡Úøo䇙ñyŠÃ©A°6ÀÊ¿©þFDBº·SáóDEa±€o¹Nê¦ä~iÿñÍQ‹òÊun¢ç,Æâðe IéŒ
The file seems to be binary and not CSV. CSV is a plain text file which depending on the text encoding may show some strange characters, but mainly plainly readable. The file above is a kind of OMF file, whatever that is.

convert .dat files to either .dta, .shp, .bdf, or .csv

I have downloaded spatial data from the USGS website that comes in a .dat format, which I can't read in textedit either - it just says "../ofr041189it03/vat.adf". I am familiar with STATA, ArcGIS, and GeoDA, so I was hoping to convert it into a type that can be read by any of these programs (preferably STATA), but don't know how. Any ideas?
Open a New Blank Excel file
In Excel
Go to Data tab
Select From Text
Select the .dat file which you want to open(Note: Select "All files" in dropdown box)
Click Import
Check Delimited and click next
Deselect the tab and select Other and give "|"(Tab symbol) then click next
Click finish and Ok