I thought I share my solution for a little problem.
I had a problem expording Special characters like ä, ö, ü, õ etc. to PDF.
Adding one line in run_report_pdf_v2.php (row 155) solved the problem for me.
data = utf8_decode($data)
Welcome to the nuBuilder Forums!
Register and log in to access exclusive forums and content available only to registered users.
Register and log in to access exclusive forums and content available only to registered users.
SOLUTION: UTF-8 in PDF
Re: SOLUTION: UTF-8 in PDF
zazzium,
We will include this in the next release.
Thanks for your help, we appreciate it!
Steven
We will include this in the next release.
Thanks for your help, we appreciate it!
Steven
-
- Posts: 84
- Joined: Mon Jul 04, 2011 12:52 am
Re: SOLUTION: UTF-8 in PDF
utf8_decode($data) does not work with characters like
œ š Ÿ ž ƒ € (output- ? ? ? ? ? ? ?)
..but replaceing it with mb_convert_encoding works like charm
$data = mb_convert_encoding($data, "WINDOWS-1252", "UTF-8");
œ š Ÿ ž ƒ € (output- ? ? ? ? ? ? ?)
..but replaceing it with mb_convert_encoding works like charm
$data = mb_convert_encoding($data, "WINDOWS-1252", "UTF-8");
Re: SOLUTION: UTF-8 in PDF
zazzium,
I have made this change for the next build and you will be imortalised with a comment next to it.
Steven
I have made this change for the next build and you will be imortalised with a comment next to it.
Steven
-
- Posts: 32
- Joined: Tue Jul 03, 2012 6:50 pm
Re: SOLUTION: UTF-8 in PDF
Hi,
Nor utf8_decode($data) neither $data = mb_convert_encoding($data, "WINDOWS-1252", "UTF-8") works with Greek characters like
γ,Γ,δ,Δ,θ,Θ,λ,Λ,μ,ξ,Ξ,σ,Σ,ψ,Ψ, ω,Ω etc (output- ? ? ? ? ? ? ?).
Is there anything else that could fix the problem?
Thanks
flsd
Nor utf8_decode($data) neither $data = mb_convert_encoding($data, "WINDOWS-1252", "UTF-8") works with Greek characters like
γ,Γ,δ,Δ,θ,Θ,λ,Λ,μ,ξ,Ξ,σ,Σ,ψ,Ψ, ω,Ω etc (output- ? ? ? ? ? ? ?).
Is there anything else that could fix the problem?
Thanks
flsd
Re: SOLUTION: UTF-8 in PDF
fsld,
Have you tried the latest version?
2.7.4.3
It has zazzium's fix.
Steven
Have you tried the latest version?
2.7.4.3
It has zazzium's fix.
Steven
-
- Posts: 32
- Joined: Tue Jul 03, 2012 6:50 pm
Re: SOLUTION: UTF-8 in PDF
Hi Steven,
Yes, I have tried the last version 2.7.4.3.
Also, if this can help, printing of a transaction using the "print" button, displays correctly only the first 7 characters from the description and 'cut' the rest. The use of 'printPDF' button, displays the entire text, but in the wrong place and with ???????????.
Thanks,
flsd
Yes, I have tried the last version 2.7.4.3.
Also, if this can help, printing of a transaction using the "print" button, displays correctly only the first 7 characters from the description and 'cut' the rest. The use of 'printPDF' button, displays the entire text, but in the wrong place and with ???????????.
Thanks,
flsd
-
- Posts: 84
- Joined: Mon Jul 04, 2011 12:52 am
Re: SOLUTION: UTF-8 in PDF
flsd,
Greek has completly different ecoding (ISO-8859-7).
Theoretically it should be mb_convert_encoding($data, "ISO-8859-7", "UTF-8"), but it does not work.
Sorry, i couldn't find a easy fix for greek, u have to play around with encoding.
Greek has completly different ecoding (ISO-8859-7).
Theoretically it should be mb_convert_encoding($data, "ISO-8859-7", "UTF-8"), but it does not work.
Sorry, i couldn't find a easy fix for greek, u have to play around with encoding.
-
- Posts: 32
- Joined: Tue Jul 03, 2012 6:50 pm
Re: SOLUTION: UTF-8 in PDF
Steven,
Here are the screen captures.
Thanks,
flsd
Here are the screen captures.
Thanks,
flsd
You do not have the required permissions to view the files attached to this post.