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) »
  • Russian characters not encoded correctly when creating reports (PDF)
Pages: [1]

Author Topic: Russian characters not encoded correctly when creating reports (PDF)  (Read 3023 times)

Armen

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Russian characters not encoded correctly when creating reports (PDF)
March 06, 2011, 01:21:20 pm
Reports>Membership Report (Detail)
Отчеты>Отчет по членству (Детальный)

Russian characters «??????????»
Example in the file

Armen

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Re: Russian characters not encoded correctly when creating reports (PDF)
March 13, 2011, 05:16:54 pm
CiviCRM 3.3.5 and CiviCRM 4.0.alpha2

http://forum.civicrm.org/index.php/topic,18404.0.html not working

Armen

  • I’m new here
  • *
  • Posts: 7
  • Karma: 0
Re: Russian characters not encoded correctly when creating reports (PDF)
April 13, 2011, 01:52:29 pm
Added:
Code: [Select]
function utf8_decode_cyr($value){
         return iconv("utf-8","Windows-1251",$value);
 }



Fixed 142 line at:
Code: [Select]
foreach ( $values as $value ) {
             $html .= "{$value}\n";
         }
         $dompdf->load_html(utf8_decode_cyr($html));
         $dompdf->set_paper ($paperSize, $orientation);
         $dompdf->render( );
         if ( $output ) {
             return $dompdf->output( );
         } else {
             $dompdf->stream( $fileName );
         }
     }
 



We have:
Ïðèâåäåííûå ñòðîêè

CP1252 → CP1251  "Приведенные строки"


Where to get the Cyrillic font?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Russian characters not encoded correctly when creating reports (PDF)

This forum was archived on 2017-11-26.