web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

Problems with accented words exporting csv

(1) ShareShare
ReportReport
Posted on by 580
Hi all, I am having problems exporting a set of data to a csv file. Those words that contain accents are being exported incorrectly.
here is a sample of the main code I use to configure the export. Thanks for your help!
I have the same question (0)
  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at
    Which encoding do you want to use? UTF-8?
     
    Please forget Excel for now. Your code generates a text file, therefore use a text editor (such as Notepad++) to check the result. Verify that you're using the right encoding when interpreting the data (in Notepad++, use the Encoding menu).
  • Jesús García Profile Picture
    580 on at
    Hi, I want to use UTF-8 or UTF-8 BOM encoding, and i think that i am using ANSI by default so, how can i change it?
  • Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at
    The code page can be set as a parameter of CommaTextStreamIo::constructForWrite(). If you open code of CommaTextStreamIo class, you'll see that the default code page there is UTF-16LE.
  • Jesús García Profile Picture
    580 on at
    Well, i tried to open csv in Notepad and encoding with UTF8 and accent problems are fixed, but its weird because i set the code to encoding the info with ut8 and i have the same problem:
    By the way, the language i am using in this headers are spanish
     
  • Verified answer
    Martin Dráb Profile Picture
    237,990 Most Valuable Professional on at
    If you're saying that it's correct if interpret the file is as UTF-8 text, then the data is correct, isn't it? The problem appears when you open the CSV in a table processor; it's apparently using a different encoding. If you're using Excel, use Data > From Text/CSV and then select the right encoding in the File Origin field.
  • Jesús García Profile Picture
    580 on at
    Okey the code was correct, all this time the problem was Excel config. Thank you!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Abhilash Warrier Profile Picture

Abhilash Warrier 669 Super User 2025 Season 2

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 449 Super User 2025 Season 2

#3
Martin Dráb Profile Picture

Martin Dráb 384 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans