DataExporter, CSV, encoding

UI Components for JSF
Post Reply
rdeoliveira
Posts: 61
Joined: 23 Jun 2011, 11:40

17 Aug 2011, 16:00

Hello,

When i use the dataexporter with the csv type, the encoding is incorrect :

Code: Select all

<p:dataExporter target="myDatatable" type="csv" fileName="myCsvFile"
	encoding="utf-8" />
My Datatable :
  • Beauté 1
    Beauté 2
    Beauté 3
When i open the csv file, the accents are displayed in a wrong format :

Code: Select all

Beauté 1
Beauté 2
Beauté 3
There is no problem with type="Excel"
JSF 2.0
Primefaces 3.0.M3
Tomcat 7.0
--
French user of primefaces

bl8cz
Posts: 4
Joined: 08 Jan 2011, 20:33

29 Feb 2012, 18:20

Hi,
i had same problem with these special signs (czech). What helped was changing the encoding value to "cp1250". If this will not help try different encoding (ISO-8859-2).

Hamsterbau
Posts: 409
Joined: 28 Dec 2011, 17:44

29 Feb 2012, 18:37

How have you opened the exported/saved file? If you use for example OOffice or Excel, you can choose in which encoding exported data should be shown. If you use a "good" editor instead it will often appear in the right encoding.
Primefaces 8.0.7 (PF Extensions 8.0)
JSF: Mojarra 2.3.2 (Spec 2.3) - running on WildFly 22

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 60 guests