A charset problem
Moderator: General Moderators
A charset problem
Problem solved, thank you!
Last edited by Waxxy on Thu Mar 13, 2008 9:44 am, edited 1 time in total.
- andym01480
- Forum Contributor
- Posts: 390
- Joined: Wed Apr 19, 2006 5:01 pm
Re: A charset problem
You need to set it in the headers of the html/xhtml output
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"></meta>
Change iso-8859-1 to what you want!
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"></meta>
Change iso-8859-1 to what you want!
Re: A charset problem
that does not work. That was the first thing what i have done.
- andym01480
- Forum Contributor
- Posts: 390
- Joined: Wed Apr 19, 2006 5:01 pm
Re: A charset problem
You haven't done it in the headers!
View-source looks like this
There are no headers there!
You want something like
You've also not done the textarea right
Should be
and the same for the Russian bit!
View-source looks like this
Code: Select all
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251"></meta>
<form action="translation.php" method="post" name="translate">
<p>Russian</p>
<p>
<textarea name="translate" cols="45" rows="5" value=""></textarea>
</p>
<p>English</p>
<p>
<textarea name="textarea2" cols="45" rows="5" value ="'.$english.'"></textarea>
</p>
</form>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">You want something like
Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1"></meta>
<title>Translation page</title>
</head>
<body>
Then output your stuff
</body>
</html>Code: Select all
<textarea name="textarea2" cols="45" rows="5" value ="'.$english.'"></textarea>Code: Select all
echo ' <textarea name="textarea2" cols="45" rows="5">'.$english.'</textarea>';