CSV UTF-8 format

Ami
Bronze 5
Bronze 5

Hello
If i want a report to produce a csv file, can i make that file in a csv utf-8 format as my data is in hebrew?

0 15 1,212
15 REPLIES 15

@Phil Any thoughts?

Hi
I need the following encodings: UTF-8. I use Russian in my applications.

We are UTF8 encoding the SaveFile file contents.

Thanks @Aleksi and @Phil

Hello,
When using action button to export csv file with hebrew characters, the file opens in excel with gibberish characters.

Any idea why ?

Thanks

Generally this is issue when we export file as CSV, not only issue with Appsheet particularly.

Worth reading another post with the same issue.

One of the reasons that I stopped using Excel and moved entirely to Google Sheets is that Google Sheets never seems to be confused about the intended code when importing CSV. Itโ€™s quite easy to import a CSV file into Google Sheets.

Youโ€™re welcome

I am investigating the issue.
We seem to be exporting the CSV file in UTF-8 format correctly.
The problem seems to occur if the exported file is missing the Byte Order Mark (BOM) at the beginning.
I am trying to understand if this is the actual problem and how it arose.

Hi Dodo,

The recommended way to open a CSV file using Excel when the file contains anything other than ASCII text is to:

  1. Open Excel
  2. Select the โ€œDataโ€ tab
  3. Click โ€œFrom Textโ€
  4. Select the CSV file
  5. Click the โ€œImportโ€ button
  6. Ensure โ€œDelimitedโ€ is selected
  7. Check โ€œMy data has headersโ€
  8. Click the โ€œNextโ€ button
  9. Under โ€œDelimitersโ€ select โ€œCommaโ€
  10. Click the โ€œNextโ€ button
  11. The โ€œData previewโ€ pane should display the imported data properly.
  12. Click the โ€œFinishโ€ button.

When I did this, the CSV containing Hebrew text was imported into Excel correctly.

When you try to open the CSV file by double clicking it, Excel uses default options but those
options may not import the data properly.

After spending three days on this issue, I discovered the following.

Older versions of Excel need a Byte Order Mark (BOM) at the start of the CSV file to properly detect UTF-8 file content.
Newer versions of Excel, since Office 365, properly detect UTF-8 file content even without a BOM.

When a CSV file is returned to the browser by CSV Export, the browser strips out the first BOM to conform to the UTF-8 decode algorithm as described in this article curl - Preserve UTF-8 BOM in Browser Downloads - Stack Overflow

To circumvent this, we need to return a CSV file starting with two BOMs.
That leaves a single BOM in the CSV file even after the browser strips the first BOM.
That enables Excel to properly detect the CSV UTF-8 file content.

If testing goes well, I will be releasing a change on Wednesday or Thursday of this week that includes a second BOM in the exported CSV file to circumvent this Excel limitation.

In the interim, you can use the Excel โ€œImportโ€ feature I described in the previous article to import the CSV file.

Thank you very much Phil.

I must say that Before I posted, I knew itโ€™s possible to open the file via excel as you described, and I wondered (with relate to your answer from January 2020), that If the system encodes utf-8 SaveFile file contents, why it is not so with action button ?

It would be great if this issue will be solved.

Also wanted to ask about the possebillity to export other formats by action button.

With workflow one can choose to create csv file, xslx, pdfโ€ฆ

There is no action button to export those formats.

It is possible to share the sheet with the users, so they can download the data in which format they choose, but thatโ€™s not the point.

Maybe Iโ€™m missing something, but why canโ€™t the app allow downloading the file, just as it is possible from the sheet itself ?

Thanks again

hi @Phil

Great job!

I also checked it in Japanese and it is working fine.
AppSheet is now one step closer to being used around the world!

@tsuji_koichi

yes, this is definitely great jobs, thanks Phil - sama.
Will help our app users (locally here) where the app languages are not English.

dodo
New Member

Hi Phil,

Tried it out just now.

Works great.

Thank you very much

Top Labels in this Space