Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to csv with cyrillic data causes unicode issue #5877

Closed
2 tasks done
AbuSM opened this issue Aug 23, 2022 · 7 comments
Closed
2 tasks done

Export to csv with cyrillic data causes unicode issue #5877

AbuSM opened this issue Aug 23, 2022 · 7 comments
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Export status: waiting for author Issue with insufficient information

Comments

@AbuSM
Copy link

AbuSM commented Aug 23, 2022

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

When I export to csv my datatable which contains cyrillic data it don't show it correctly
image

Expected behavior 🤔

Should show all columns with all rows correctly

Steps to reproduce 🕹

Link to live example:

Steps:
1.
2.
3.
4.

Context 🔦

No response

Your environment 🌎

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Order ID 💳 (optional)

No response

@AbuSM AbuSM added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Aug 23, 2022
@cherniavskii
Copy link
Member

Hey @AbuSM
I cannot reproduce the issue using this demo: https://codesandbox.io/s/silent-worker-3tezok?file=/demo.tsx
I tried both Apple Numbers and Google Sheets to open the exported csv file, but it seems to work just fine.
Can you reproduce it?

@cherniavskii cherniavskii added component: data grid This is the name of the generic UI component, not the React module! status: waiting for author Issue with insufficient information feature: Export and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Aug 23, 2022
@AbuSM
Copy link
Author

AbuSM commented Aug 23, 2022

Hi @cherniavskii, I've also tried with Google Sheets and its worked, but doesn't in Microsoft Excel. Is there a way how to fix it for this MS Excel?

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Aug 23, 2022
@cherniavskii
Copy link
Member

@AbuSM Can you try setting utf8WithBom option to true?
You can find more info here https://mui.com/x/react-data-grid/export/#file-encoding

@cherniavskii cherniavskii added the status: waiting for author Issue with insufficient information label Aug 23, 2022
@AbuSM
Copy link
Author

AbuSM commented Aug 24, 2022

Thank you for your reply! Yes, I tried with utf8WithBom option but unfortunately it didn't help(

@github-actions github-actions bot removed the status: waiting for author Issue with insufficient information label Aug 24, 2022
@cherniavskii
Copy link
Member

Hey @AbuSM
I can reproduce the issue with Microsoft 365 Excel for web:
Screenshot 2022-08-25 at 19 19 14

But utf8WithBom option seems to fix the issue:
Screenshot 2022-08-25 at 19 20 49

Can you double check with this demo: https://codesandbox.io/s/reverent-goldstine-mvg8qx?file=/demo.tsx:427-438

Thanks!

@cherniavskii
Copy link
Member

I started to think about setting this flag to true by default in v6, but then found this #1695 (comment)

@cherniavskii cherniavskii added the status: waiting for author Issue with insufficient information label Aug 25, 2022
@github-actions
Copy link

github-actions bot commented Sep 1, 2022

Since the issue is missing key information and has been inactive for 7 days, it has been automatically closed. If you wish to see the issue reopened, please provide the missing information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! feature: Export status: waiting for author Issue with insufficient information
Projects
None yet
Development

No branches or pull requests

2 participants