 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
molavec
Joined: 20 Nov 2008 Posts: 9
|
Posted: Tue Dec 16, 2008 7:07 am Post subject: show html output in utf8 codification |
|
|
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.
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
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
So, is a way to set this packages to utf8 codification? |
|
| Back to top |
|
 |
mark

Joined: 07 Jan 2007 Posts: 1210
|
Posted: Wed Dec 17, 2008 12:11 am Post subject: |
|
|
| 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 |
|
 |
molavec
Joined: 20 Nov 2008 Posts: 9
|
Posted: Wed Dec 17, 2008 2:36 am Post subject: Problem resolved |
|
|
Thx for your fast reply to my questions again mark.
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 |
|
 |
started
Joined: 01 Mar 2010 Posts: 1
|
|
| Back to top |
|
 |
|
|
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
|
|