Export product in csv problem encoding

Hi,



when you export product in csv file, the file is enconding in UTF-8 (without BOM) and when you open with excel, the special characters are not encoding correctly.



To fix the problem, the files must be enconding in UTF-8 with BOM,



how i can fix this in the “schemas/exim/products.php”, where i can add this :



fputs($csvFile, b"\xEF\xBB\xBF");

For people who have some problems with UTF-8 export CSV, just open the file :



/controllers/admin/exim.php




replace at the line 983 in the function fn_put_csv



```php

fwrite($fd, $csv, strlen($csv));

```

by

```php

fwrite($fd, “\xEF\xBB\xBF”, 3);

fwrite($fd, $csv, strlen($csv));

```



Now when you open the csv file with excel, all characters are good :slight_smile:

[quote name=‘creativeuser’]For people who have some problems with UTF-8 export CSV, just open the file :



/controllers/admin/exim.php




replace at the line 983 in the function fn_put_csv



```php

fwrite($fd, $csv, strlen($csv));

```

by

```php

fwrite($fd, “\xEF\xBB\xBF”, 3);

fwrite($fd, $csv, strlen($csv));

```



Now when you open the csv file with excel, all characters are good :)[/QUOTE]



I did it but still the problem exist?

I put the change - delete cache, but still the same?

I have tried this and it's not working. I'm on 2.2.4. I need a solution.

Change was made as Creativeuser suggested. Exim.php in line 1032.

And cache cleared.



Solved:

It is working. It was a file editor problem. Have to change encoding in notepad2. Sorry. Export saves file in utf-8 with signature, which is fine.

Hello

i have this problem

Help....

When i try to export i have this message:

Warning: set_time_limit() has been disabled for security reasons in /home/zenon/public_html/app/controllers/backend/exim.php on line 24

Warning: Cannot modify header information - headers already sent by (output started at /home/zenon/public_html/app/controllers/backend/exim.php:24) in /home/zenon/public_html/app/functions/fn.fs.php on line 420

Warning: Cannot modify header information - headers already sent by (output started at /home/zenon/public_html/app/controllers/backend/exim.php:24) in /home/zenon/public_html/app/functions/fn.fs.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /home/zenon/public_html/app/controllers/backend/exim.php:24) in /home/zenon/public_html/app/functions/fn.fs.php on line 424

app/controllers/backend/exim.php

replace:

set_time_limit(0);

with

@set_time_limit(0);

Is ok now, thx!!!

work!!!

is work but not really

I mean, now i can export, but when i open the file i have this:

			
Warning: fpassthru() has been disabled for security reasons in /home/zenon/public_html/app/functions/fn.fs.php on line 433

is work but not really

I mean, now i can export, but when i open the file i have this:


Warning: fpassthru() has been disabled for security reasons in /home/zenon/public_html/app/functions/fn.fs.php on line 433

Please ask your hosting administrator to enable this function. It is required for correct export

There is another way?

Because the hosting admin say that can not do this, for security reason.

The probleme is that till now 2 days ago, the export is working…And then i have the error whit fpassthru

Please help!!!

There is another way?

Because the hosting admin say that can not do this, for security reason.

The probleme is that till now 2 days ago, the export is working…And then i have the error whit fpassthru

Please help!!!

Looks like they changed server configuration

They sad than they not change anything....:(

So, maybe i have a problem at the platform cscart??

They sad than they not change anything.... :(

So, maybe i have a problem at the platform cscart??

This function is used in exim for many years. Please try exporting on server or screen and check the results.

ok

it works

thanks


I have this error

PHP Warning: set_time_limit() has been disabled for security reasons in /home/zenon/public_html/app/controllers/backend/datakeeper.php on line 23

If i put @set_time is ok?

ok

it works

thanks


I have this error

PHP Warning: set_time_limit() has been disabled for security reasons in /home/zenon/public_html/app/controllers/backend/datakeeper.php on line 23

If i put @set_time is ok?

Yes, it should help if your hosting provider do not plan to enable this function

How can we solve this problem?

fwrite($fd, "\xEF\xBB\xBF", 3);

its add question mark and quotes (?") before and after 30 60 90 th line in exported .csv file

example in exported csv file

Product code

?"xxxx"

hi crazyshark20

http://forum.cs-cart.com/topic/44001-data-export-issue/

this addon called "minify HTML". I have it disabled and it is working perfectly for exported csv , and then as soon as I enable the addon the same thing happens every 30 lines breack.

Excel does NOT handle csv files properly. In a csv, EVERYTHING should be considered text. Excel will try to change things like "0092818" to 92818, etc. Do NOT use excel for modifying csv files. The BOM maker is not part of the CSV format standard.

Thanks kidicarus. i installed again from scratch but when i put this code or disable all addon nothing change.

Thanks tbirnseth. But i want to export for translate utf-8 format but when put this code add extra quotes. 30 60 90th line

i test 4.3.9 and 4.5.1