Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-24-2010, 09:03 PM   PM User | #1
danilo
New to the CF scene

 
Join Date: Jun 2010
Location: Canada, Ontario, Barrie
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
danilo is an unknown quantity at this point
Question "ã©" instead of "é" When preparing reports in PDF using PHP MySQL and PDF

I have a web application that uses Mysql database and has been developed in PHP. When displaying the text from the database in HTML format, the french accents are ok, but now I need to develop the reports in PDF and when displaying the texts in PDF, the accents show different characters. The following is the HTML output: "été crédités"
and this is in PDF: "été crédités".

I am receiving the text to display in a $_SESSION variable

This is the code that I am using to create the PDF:

[CODE]

<?php
include "rinclude/Session.php"; // sesion time control
require('../fpdf/fpdf.php');

$pdf=new FPDF('P','mm','Letter');
$pdf->AliasNbPages();
$pdf->AddPage();
$pdf->SetFont('Times','',11);
$pdf->MultiCell(0,5,$_SESSION[Wsptext]);

$pdf->Output();
?>

[CODE]
I think that is because the character set, but I do not know how to add the character set to the PDF.

Thank you for your help.
danilo is offline   Reply With Quote
Old 09-22-2010, 06:55 PM   PM User | #2
warodri
New to the CF scene

 
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
warodri is an unknown quantity at this point
html_entity_decode

Hi!

I guess you could figure out that problem. I had the same and I could make it work using: html_entity_decode from PHP.

check here: http://www.php.net/manual/en/functio...ity-decode.php
warodri is offline   Reply With Quote
Reply

Bookmarks

Tags
html, mysql, pdf, php

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:24 AM.


Advertisement
Log in to turn off these ads.