Hi!
I need to export values with accent (ã, õ, á,ó...) to CSV
file from OTRS Survey, but isn't possible.
Link for example:
http://server/otrs/index.pl?Action=Agen ... SurveyID=2
Each column that has accent is truncated in file exported.
How can i change the character encoding from the export model to
ISO-8859-1?
Files module for package - Survey CSV Export
Kernel/Config/Files/SurveyExport.xml
Kernel/Modules/AgentSurveyExport.pm
Custom/Kernel/Modules/AgentSurveyZoom.pm
Kernel/Output/HTML/Standard/AgentSurveyZoomExport.dtl
Any help is appreciated...
Thanks
[Solved] Export values with accent (PT-BR ISO-8859-1) to CSV
Moderator: crythias
[Solved] Export values with accent (PT-BR ISO-8859-1) to CSV
Last edited by amdkryn on 22 Mar 2014, 23:40, edited 2 times in total.
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: Export values with accent to CSV - Help
What's the encoding of your DB?
For the future: You should say which add ons you have installed. The export is neither standard OTRS nor part of the Survey add on. It's an extra add on available on OPAR.
The module sets "utf-8" as the charset in Kernel/Modules/AgentSurveyExport.pm. Search for "Attachment(". Change the utf-8 to iso-8859-1. Please keep us informed whether this fixes your problem.
For the future: You should say which add ons you have installed. The export is neither standard OTRS nor part of the Survey add on. It's an extra add on available on OPAR.
The module sets "utf-8" as the charset in Kernel/Modules/AgentSurveyExport.pm. Search for "Attachment(". Change the utf-8 to iso-8859-1. Please keep us informed whether this fixes your problem.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: Export values with accent to CSV - Help
I do not sure, I believe that is the default.
A consultant had already corrected other reports, but this has not yet and I want to learn to solve.
I changed the quoted text did not work. Any other suggestions?
A consultant had already corrected other reports, but this has not yet and I want to learn to solve.
I changed the quoted text did not work. Any other suggestions?
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
Re: Export values with accent to CSV - Help
There was a byte-order-mark in the CSV export; see here for the fix (and let me know if it works for you!!)
https://github.com/tuxwerk/OTRS-SurveyExport/pull/1
https://github.com/tuxwerk/OTRS-SurveyExport/pull/1
huntingbears.nl - @michielbeijen on Twitter
Re: Export values with accent to CSV - Help
I copied the code and saved in place of the original but the accents do not work yet. Any other tips?
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
Re: Export values with accent to CSV - Help
Someone?amdkryn wrote:I copied the code and saved in place of the original but the accents do not work yet. Any other tips?
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
Re: Export values with accent to CSV - Help
BUMP
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.
Re: Export values with accent to CSV - Help
For those interested, the problem of exporting the report with accents (PT-BR) was solved with the following configuration (/opt/otrs/Custom/Kernel/Modules/AgentSurveyExport.pm):
Under "user Kernel ::System::HTMLUtils;" add "use Encode;" and in line 110, change as code below:
[/b]
Fuçando nos meus sistemas encontrei como foi configurado o AgentSurveyExport.pm, precisa adicionar o "use Encode;" no inicio do arquivo pra usar essa função e a partir da linha 110 alterar o código conforme exemplo acima em inglês.
Under "user Kernel ::System::HTMLUtils;" add "use Encode;" and in line 110, change as code below:
Code: Select all
return $Self->{LayoutObject}->Attachment(
Filename => "survey.csv",
ContentType => "text/csv",
Content => encode("iso-8859-1",$CSV),
);
}
1;
Fuçando nos meus sistemas encontrei como foi configurado o AgentSurveyExport.pm, precisa adicionar o "use Encode;" no inicio do arquivo pra usar essa função e a partir da linha 110 alterar o código conforme exemplo acima em inglês.
OTRS version 5.0.27 (With ITSM), Operating System OpenSuse 12 with Mysql.