• Boothleads
  • 0 Points
  • Member since 2013

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
  • 2
My visualforce page downloads excel and csv files which works fine for English but the UTF 8 characters are breaking.For xls I have fixed it up with <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" /> inside <head> tag,but it is unfortunately not working for CSV.Can anyone help me out please?I know that if we use google sheets to view we can be able to see the proper UTF 8 characters ,but if not viewed with Google sheets what could be the possible solution?My code also has a batch class which is generating a csv from Apex code.So in apex how this can be fixed?I have tried with "ContentType  = 'text/csv; charset=UTF-8';"  in the apex controller,but it is not working.Any help will be highly appreciated!!!

Issue is that certain symbols/letters appear broken on the CSV file that has been exported, as by default the encoding is ISO-8859-1.
However forcing it to export in UTF-8 seems to have zero effect - meaning the exported file will still have broken symbols, even though the symbols/letters are displayed correctly in SF itself.

The export function VS page code piece is like this :
<apex:page controller="TestPage" cache="true" contentType="text/csv#filename.csv; charset=UTF-8">

Tried the solutions offered in ..




I am getting this error when I tried to update user from salesforce backend.

Error: Duplicate Username.
Another user has already selected this username.
Please select another.

but there is no user in this org with same username. I have also checked all my sandboxes but I didn't find user with same username.


Can anybody help me to get through this.




  • February 11, 2013
  • Like
  • 0