CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Convert export data into utf-16 - where to start?
Pages: [1]

Author Topic: Convert export data into utf-16 - where to start?  (Read 1343 times)

laborg

  • Guest
Convert export data into utf-16 - where to start?
May 19, 2008, 06:12:00 am
hi!

To be able to read exported data in excel it has to be encoded in utf-16 (little endian) (for austria). Where can I tweak this setting? Changes made in /CRM/core/Report/Excel.php (to the result string) don't go through. Where is the final encoding of downloadable files done?

many thanks in advance,
Gerhard

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Convert export data into utf-16 - where to start?
May 19, 2008, 02:02:59 pm

for csv downloads, it should be done in the Excel.php file. we pass in an array of values which are retrieved from the db, and the function (makeCSVTable) does the formatting and output. Can u encode it there? or that does not work?

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

laborg

  • Guest
Re: Convert export data into utf-16 - where to start?
May 20, 2008, 02:39:27 am
Excel.php was my first try (I altered the separator there previously), but at first I didn't succeed due to not enabled mb_convert_encoding. After quite some trial and error I got a simple solution which doesn't convert utf8 to utf16, but utf8 to iso8859-1, which fits my needs. So for users in Austria, Germany and possibly switzerland the attached Excel.php should do the trick.

greetings,
Gerhard

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • Convert export data into utf-16 - where to start?

This forum was archived on 2017-11-26.