Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.


If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping


Answers may be delayed for posts that do not include sufficient information.

Data Exporter UTF8

Exported Excel appears with special characters. What do I need to put in the excel mapping settings to be exported with UTF8 encoding? I tried to put CSV-Encoding = UTF8 and it didn't work

Comments

  • Excel with exported data thus has special characters:

  • To try to fix it I edited the following file:
    /ca/providence/app/lib/ca/Export/ExportFormats/ExportCSV.php

    <br /> public function __construct(){<br /> $this->ops_name = 'CSV';<br /> $this->ops_element_description = _t('Values are column numbers (indexing starts at 1).');</p> <pre><code> $this->opo_dom = new DOMDocument('1.0','utf-8'); $this->opo_dom->formatOutput = true; $this->opo_dom->preserveWhiteSpace = false; parent::__construct(); } private function getDom() { return $this->opo_dom; }

    (...)

    BaseExportFormat::$s_format_settings['CSV'] = array(
    (...)
    'CSV_encoding' => array(
    'formatType' => FT_TEXT,
    'displayType' => DT_SELECT,
    'width' => 40, 'height' => 1,
    'takesLocale' => false,
    'default' => '"',
    'label' => _t('Encoding'),
    'description' => _t('Encoding of output fields.')
    ),

    In the mapping excel I added the configuration "CSV_encoding"

    But excel continues to be exported with special characters. Any ideas to resolve this issue? Thanks

  • Thanks for this! Can you submit this as a pull request?

  • Even though this code is a help, additional steps have to be taken. The CSV exports correctly from the CA, when opening in notepad ++ it is possible to view the data with correct accents, but to see correctly in Excel we must do the following:
    1) Open notepad ++ select the menu “Encoding> Encode in UTF-8” and save
    2) When opening Excel it is already possible to visualize the accents correctly

    Thanks.

Sign In or Register to comment.