dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] php script different output when run local and from server

  1. #1
    Join Date
    Nov 2011
    Posts
    2

    resolved [RESOLVED] php script different output when run local and from server

    Hi, guys, I'm in a very strange situation. I have a prestashop and its working fine but the pdf reports are all written ? simbols because my language is bulgarian. So what I did is I changed the default pdf tool of presta, which is called fpdf, with one which can write in utf-8 called tfpdf(its made from the guys who made fpdf). When I did this on my local machine everything was working excellent but when I uploaded the patch to the server it didn't worked. The '?' symbol became an empty square what can be wrong? My computer is running on linux and I suppose the server does too, they are both running php5. I made a separate script to read text from a file and generate a pdf with it, and its working, only not working when presta generates its invoices. The db collation is set to utf-8.
    Both installations, on my pc and on the server are identical. I'm very confused. Thanks to anyone who share some toughts. cheers

  2. #2
    Join Date
    Apr 2010
    Posts
    7
    An easy workaround to this could be to output this at the top of your webpage as I assume your problem could be with browser:

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">

  3. #3
    Join Date
    Nov 2011
    Posts
    2
    I'm sorry I didn't marked this as solved. I found the problem. Prestashop was making making the string non utf and the tfpdf Write function expects utf-8 encoded string So I fixed it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles