PEAR Forum :: PHP Extension and Application Repository

PEAR Forum Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
show html output in utf8 codification

 
Post new topic   Reply to topic    PEAR Forum Forum Index -> Internationalization
View previous topic :: View next topic  
Author Message
molavec



Joined: 20 Nov 2008
Posts: 9

PostPosted: Tue Dec 16, 2008 7:07 am    Post subject: show html output in utf8 codification Reply with quote

hello people:

I have a problem with codification in pear that i didn't resolved since a lot of time before and try until today, but i can't. Twisted Evil Twisted Evil Twisted Evil

all my pages and editors (include my databases) are write in utf-8 codification and when i put some text that I want appear in html through some PEAR packages this packages spit out other characters.

Example:
when put in /QuickForm package:
Code:
 require_once 'HTML/QuickForm.php';
        .
 $form->addElement('textarea', 'final_desciption', 'Descripción Final:', array('rows' => 10));

it returns
Code:
Descripción Final


or in Auth.php:
Code:
require_once "Auth.php";
          .
function loginFunction(){
  echo '<form >
  blah blah blah <label >Contraseña:</label> blah blah blah';
}
         .
$a = new Auth("MDB2", $options, "loginFunction", $optional);

it returns
Code:
Contraseña: 


So, is a way to set this packages to utf8 codification?
Back to top
View user's profile Send private message
mark



Joined: 07 Jan 2007
Posts: 1210

PostPosted: Wed Dec 17, 2008 12:11 am    Post subject: Reply with quote

You'll have to send the right UTF-8 headers to get these characters displayed properly. This is not a problem with the mentioned PEAR packages, but with your scripts that use them. If you would use some other libraries, you would have the same problems.
Back to top
View user's profile Send private message
molavec



Joined: 20 Nov 2008
Posts: 9

PostPosted: Wed Dec 17, 2008 2:36 am    Post subject: Problem resolved Reply with quote

Thx for your fast reply to my questions again mark. Laughing Laughing Laughing Laughing

Well, you're right!!, The problem was that i test a lot of script in the same php file and i did not test with "strange" characters in my templates files. This templates files have a codify header like:

Code:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


Finally, this header resolved the problem.

THanks, again.
Back to top
View user's profile Send private message
started



Joined: 01 Mar 2010
Posts: 1

PostPosted: Mon Mar 01, 2010 9:19 am    Post subject: Reply with quote

Thanks for the code.
_________________
free baby coupons
free baby coupons
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PEAR Forum Forum Index -> Internationalization All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



PEAR Forum topic RSS feed 
Powered by phpBB © 2001, 2005 phpBB Group

Provided by Ministry of Web developement

'Actiemonitor' online projectmanagement software