Main > Beta Testing

3.7 BETA 1

<< < (8/9) > >>

Corey Cooper:
Can you attach or send me a sample tournament file?


--- Quote from: MotoguzziF91 on October 20, 2019, 04:17:18 AM ---When exporting the stats as a CSV file, the German umlauts (ö ä ü) and the French special characters (é è ê à ë) and the € sign are not displayed correctly (see Appendix)
no problems with HTML

--- End quote ---

MotoguzziF91:
Hi Corey,
I have sent you a tournament file by mail

Corey Cooper:
Got the email.  Thanks MotoguzziF91.

So when moving to Electron, I had to make some decisions about file encoding.  Previously, the Microsoft API I was using to read and write files essentially took care of encoding.  If the data needed encoding, it was encoded automatically, usually using UTF-16.

With Electron, I am able to encode however I want.  So I went with UTF-8, which is the most popular encoding format.  That file is correctly encoded in UTF-8.  The problem is Excel.  It doesn't recognize the file as being encoded with UTF-8, because the file doesn't have a BOM - or a "byte order marker".  This is a couple of characters at the start of the file that indicate the encoding.  But UTF-8 doesn't require a BOM, and in fact it isn't even recommended it be used.  So the file is encoded correctly, but Excel doesn't recognize it as being encoded at all.  Which is frankly very surprising to me.

If you want to see what I mean, you can use an app like Notepad++.   Open up the CSV file in Notepad++ and you'll see the characters are displayed correctly.  Click on the "Encoding" menu and you'll see that "Encode in UTF-8" is selected, indicating that Notepad++ recognized the file has been encoded in UTF-8.  If you select "Encode in UTF-8-BOM", save the file, and then open it in Excel, you'll see the characters are display correctly now.

So while technically not a bug, I'm not sure yet how I will move forward on this.  I might want to update the code to add the BOM anyway, or give an option in the preferences.


--- Quote from: MotoguzziF91 on October 20, 2019, 11:17:59 AM ---Hi Corey,
I have sent you a tournament file by mail

--- End quote ---

MotoguzziF91:
Thanks Corey,
This works with notepad ++, it is a bit awkward for me because I work with 4 csv files and macros in excel. But I can live with that.
I have sent you a mail with an error message concerning the stats. Should I post this here in the forum?

MotoguzziF91:
It works also if I export the stats directly into a .txt file and open it in Windows Notepad and save it as a .csv file with UTF-8-BOM encoding

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version