export_delimiter Changed but nothing happen.

Hey everyone,

Im trying to export my report,

Here in france de delimiter is “;” so I changed it into my “config.php” (cause changing it in the settings changed nothing, it was still a “,”)

at the line :

‘export_delimiter’ => ‘;’,

But when I export and open the .csv the delimiter is still “,”…

I’ve tried a quick repair and rebuilt, a repair of the config.php file but it change nothing.

Do anyone have this issue ? I really need to export the file to send it to my client/provider.

Have a good day

I’d like to try this, using exactly the same steps you’re using.

Which version of SuiteCRM is this?

And exactly which module are you trying to export, and which steps do you take to get there?

Version 7.10.10
Sugar Version 6.5.25 (version de construction 344)

Im going into report, get into a report, action -> export.

I’ve seen in the config_override.php :

$sugar_config['export_delimiter'] = ';';

So, the config have saved my change, but its not apply for no reason.

Sooo,

I fixed a first issue.

In my user (myself) settings the delimiter in advanced tabs was still ‘,’ so I changed it and it finally work ! Its look like the delimiter in user setting override the one in the general settings.

Next issue : the UTF-8 encode.

If I edit my exported CSV in notepad here is whats I have :

"Nom Affaire ";“Coopérative”;“Janvier”
“Carrefour - Coop TEST”;“Coop TEST”;“€18.00”

In my Excel soft i got this :

Nom Affaire Coopérative Janvier
Carrefour - Coop TEST Coop TEST €18.00

Tried UTF-16LE, ISO-8859-9, ISO-8859-14 -> Those one fix the char but not the Euro char (€) I got something like this :

Nom Affaire Coopérative Janvier
Carrefour - Coop TEST Coop TEST ¤18.00

If I change the encode, the € char change to another buggy char, not the €.

Unfortunately these CSV issues are tough to get right, Microsoft made some terrible options here and they are almost impossible to deal with without some extra steps.

I use Notepad++ and always open my CSV exports first there, and I check encoding and change it (their “Encoding” menu is great for this) before opening in Excel.

1 Like

The issue come from the CRM cause when I Open the .csv I got the wrong char (so its directly in the file) :

"Nom Affaire ";“Coopérative”;“Janvier”
“Carrefour - Coop TEST”;“Coop TEST”;“¤18.00”

Maybe I can use a str_replace() to replace the “¤” with a “€” ? But dont know wich file I got to edit.

Don’t use string replace, use a re-encoding of text like I suggest. It takes care of all possible characters at once.

The fact is that not all user will have the time to edit it in a notpad, to re change every € symbol … I need to find a fix at the source of the problem for my user (so it will be transparent for them.)

So in UTF-16LE Everything display well in the notepad, but the € symbol in excel display with “¬” symbol.

What is your language?

Have you tried basic ANSI enconding, or UTF-8?

Another thing that occurred to me is that in Excel, instead of double-clicking the CSV to open it, just start a blank spreadsheet and use the Text Import Wizard:

https://support.office.com/en-us/article/text-import-wizard-c5b02af6-fda1-4440-899f-f78bafe41857

There you can select the encoding in the “File origin” field.

Sorry I was in holliday !

So yeah, I’ve tried UTF-8 got “Coopérative” the “é” not display well. Thats fixed with UTF16-LE.

I dont have AINSI in suitecrm option. Got a lot of ISO-8859 but that dont work too…

The import data thing work. But thats not really good for the workflow… I will have to send the .csv to client/provider… :unsure:

The really strange thing is that in UTF16-LE, if I open it with a notepad, everthing is normal, the “€” char display well, and when I open it with excel I got a weird “¬” instead of “€”.

EDIT : Also tried to make a new currencie (even if I already got an EURO one…) Changed nothing.

You have to work with what you have. As I said, Microsoft’s handling of this is not consistent (it makes assumptions based on the computer’s language, instead of just relying on the actual text file).

So SuiteCRM is producing the text file with the encoding you specify, it can’t do any better.

Now you must come up with your process, it could be an Excel macro to automate some steps. Make sure you test this in computers with different Locales, especially if you have international clients.

1 Like

Sooo I fixed the € Symbol.

The CRM just doesnt have the option to encode in UTF-8 WITH BOM.

So just take the UTF-8 encodage in user advanced settings

And add this code in AOR_Report.php file, just before print $csv :

$csv = chr(239) . chr(187) . chr(191) . $csv;

This will just fix for the Report Module… Will have to edit every file for every module :frowning:

This have to be reported to the devs… We just need a UTF8 With BOM in encodage option and the nightmare end !

The “devs” won’t see it here, if you want the dev’s attention you need to post on Github.

1 Like

Done !

1 Like