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) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Special characters (e.g. euro) don't appear in CiviReport samples when printing
Pages: [1]

Author Topic: Special characters (e.g. euro) don't appear in CiviReport samples when printing  (Read 1243 times)

diablodale

  • Guest
Special characters (e.g. euro) don't appear in CiviReport samples when printing
August 04, 2011, 02:40:32 am
If you have non-basic ASCII characters in CiviCRM reports (for example: euro, umlauts, ö, ü, ß, etc.), these characters will likely not appear correctly if you use the sample reports and then choose to "print report". These extended characters will be needed for many reasons like:
a) CiviCRM default currency is set to Euro (needed for much of Europe)
b) names of people or locations in Germany, e.g. Hermannstraße

The reason is that the sample reports like "Donor Report (Summary)" do not specify their character set in the Report Settings / Report Header. Its default behavior will almost always cause printing errors for these extended characters. What is needed is the explicit definition that we (CiviCRM) are using unicode UTF-8. This is easily done.

Open your report, then the report settings. In the report header field look for:
<html>
  <head>
    <title>CiviCRM Report</title>
and change it to
<html>
  <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>CiviCRM Report</title>

This should now allow any UTF-8 characters to correctly print.

Perhaps in a future version of CiviCRM, the charset for output can be globally set through core code.

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Special characters (e.g. euro) don't appear in CiviReport samples when printing
August 04, 2011, 03:35:12 am
Hi,

civi is already using utf8. Check out your theme/config if it isn't the case for your site.

THe only part where it doesn't output in utf8 I think are the pdf  (never quite understood why it can't be utf8 in the library).
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Special characters (e.g. euro) don't appear in CiviReport samples when printing

This forum was archived on 2017-11-26.