You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2011-12-09 12:48:29

amats
Member
Registered: 2011-05-04
Posts: 7

EzPDF encoding problem in retrieving data... not only displaying them

Greetings to everyone.

I would like to ask for your help on the encoding problem of lists printing, the result in .pdf .csv is the same

I have my database, tables, UTF-8 with Collation general_ci.

My language is Greek and i see normaly all Greek Characters in PhpMyAdmin and GLPI.

When i press on print all Greek text is transformed in ??????

I opened and edited class.ezpdf.php like this to test the results.

function ezProcessText($text){
  echo "<br/>Normal:".$text."<br/>";
  $text1 = iconv("ISO-8859-7", "UTF-8",$text);
  echo "ISO-8859-7:".$text1."<br/>";
  $text2 = iconv("UTF-8","ISO-8859-7",$text);
  echo "UTF-8:".$text2."<br/>";
  $text="καλημερα";
  echo "Normal:".$text."<br/>";
  $text1 = iconv("ISO-8859-7","UTF-8",$text);
  echo "ISO-8859-7:".$text1."<br/>";
  exit;
}

and i had the following result

Normal:?????  <- this is how $text variable is send encoded to ???????
ISO-8859-7:?????
UTF-8:?????
Normal:��������
ISO-8859-7:καλημερα


Can anyone faced such a problem, or can understand where it the text converted to ?????

Offline

#2 2011-12-09 15:50:40

amats
Member
Registered: 2011-05-04
Posts: 7

Re: EzPDF encoding problem in retrieving data... not only displaying them

I have read posts and changed in search.class.php

decodeFromUtf8(html_clean($value), 'windows-1252');

to

decodeFromUtf8(html_clean($value), 'iso-8859-7');

Now I don't have the ???? result, but still the characters are not Greek.

any help!??!? Is this font problem?!

Offline

#3 2011-12-09 16:04:55

tsmr
GLPI-DEV
From: Rennes
Registered: 2005-08-26
Posts: 11,632
Website

Re: EzPDF encoding problem in retrieving data... not only displaying them

Unactivate plugins for test ?


Xavier Caillaud
Blog GLPI Infotel

Offline

#4 2011-12-13 10:12:33

amats
Member
Registered: 2011-05-04
Posts: 7

Re: EzPDF encoding problem in retrieving data... not only displaying them

Greetings to all...

I will try not to tire you so i will be quick.

1. I have disabled all plugins
2. I have changed every windows encoding change to iso-8859-7
3. I have changed the default apache encoding to iso-8859-7 from utf-8 so that pages without any encoding header to be encoded in iso-8859-7
4. In PDF, CSV etc reports the result was missencoded characters, but not ???? as I was taking in the first place.
5. Strange is that if i change the "&display_type=3" to "&display_type=0", to have the output in html, and althought the page encoding is iso-8859-7 when i press on IEs VIEW> ENCODING the characters which should be decoded from UTF8 -> ISO-8859-7 are still missencoded.
6. The most weire is that if i change IEs VIEW> ENCODING to UTF-8 everything for the first time... appears normally.. i can see all Greek text and characters.

So this means that the decoded from UTF-8 > ISO-8859-7 text somewhere in the process until it is desplayed is encoded again to UTF-8... right?!

Server Settings:
1. The php.ini all mbstring are commented out as it was allthought i mane a couple of tests modifying them.
2. In apache AddDefaultCharset UTF-8 serves the html-only output normaly (UTF-8 Characters Encoding - UTF-8 IE View) , AddDefaultCharset ISO-8859-7 serves (UTF-8 Characters Encoding - ISO-8859-7 IE View)

Any ideas, thoughts, suggestions... would be very very helpfull

Offline

#5 2011-12-15 10:12:50

amats
Member
Registered: 2011-05-04
Posts: 7

Re: EzPDF encoding problem in retrieving data... not only displaying them

Good morning 2 all smile

Does anyone has an idea what should i be looking for?? Any help would be very very much appreciated. I think i have almost everything i could think of but for sure it's a bad or unlucky combination of acts... maybe someone can give me a base to work on.

thanks in advance for reading my messages

Offline

#6 2012-03-12 14:51:53

mx5gr
Member
Registered: 2012-03-12
Posts: 3

Re: EzPDF encoding problem in retrieving data... not only displaying them

amats wrote:

Good morning 2 all smile

Does anyone has an idea what should i be looking for?? Any help would be very very much appreciated. I think i have almost everything i could think of but for sure it's a bad or unlucky combination of acts... maybe someone can give me a base to work on.

thanks in advance for reading my messages

Any update on this as the problem still persists? I changed the afm fonts with ones that support Greek charset (ISO-8859-7) but we still get ??? in the exported PDFs..

Offline

#7 2012-03-27 14:56:58

mx5gr
Member
Registered: 2012-03-12
Posts: 3

Re: EzPDF encoding problem in retrieving data... not only displaying them

Tried several solutions, even the one descibed in http://www.glpi-project.org/forum/viewt … p?id=22709 for Cyrillic (used Windows-1253 as encoding instead of the 1251 that the topic describes) to no effect.

any help?

Offline

#8 2014-06-13 12:17:08

lenagk
Member
Registered: 2014-06-13
Posts: 1

Re: EzPDF encoding problem in retrieving data... not only displaying them

did you ever manage to find a solution on this issue? I am trying to use the print to pdf plugin with greek in a live 0.83.7 site, but can't get it to work. Getting the same issue on a 0.84.5 test site as well

any help would be appreciated

Offline

#9 2024-02-07 15:26:12

NikosKorompos
Member
Registered: 2024-02-07
Posts: 1

Re: EzPDF encoding problem in retrieving data... not only displaying them

For anyone still interested try this.

      mb_convert_encoding($body, 'UTF-8', 'ISO-8859-7');

Last edited by NikosKorompos (2024-02-07 15:28:05)

Offline

Board footer

Powered by FluxBB