Go Back   Armenian Knowledge Base > Technical sections > Webmaster Zone > Web Development

Reply
 
Thread Tools

UTF-8 / PHP / Templates
Old 27.10.2005, 08:03   #1
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 45
Posts: 896
Rep Power: 0
Default UTF-8 / PHP / Templates

Переделываю сайт на utf-8.
Читаю из пхп файла, простой хтмл файл с русским текстом, испольую шаблоны XTemplate:

PHP Code:
//Content
$x=new XTemplate ("tpl/tpl1.html");
$filename = "about.html";
$source = fopen($filename, "r");
$content = fread ($source, filesize ($filename));
fclose ($source);

$x->assign("content", $content);
$x->parse("main");
$x->out("main"); 
Перед текстом появляется непонятный символ в виде кубика, который виден только в View->Source. В самом же хтмл файле такого символа нет. В итоге на конкретном примере у меня весь контент спускается на одну строку

? <p>Услуги предоставляются и т.д.

Что делать?

Old 27.10.2005, 10:11   #2
Волк, просто волк...
 
_ WOLF _'s Avatar
 
Join Date: 07 2002
Location: /dev/null
Age: 81
Posts: 250
Rep Power: 0
Default

Aram jan,
Indz tvum a qo mot problem@ Unicode BOM-ic a...

Text editor-ic petq a ases vor UTF-8 fileri headernerum chavelacni BOM-@.
Xosqi UltraEdit-@ normal kani

Old 27.10.2005, 10:28   #3
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 45
Posts: 896
Rep Power: 0
Default

Es arden uxeci inch vor apush variantov, hex. editorov mta jnjeci et symbol@.
Voobshe-to es Notepad++ -ov ei gorc anum, Dreamweaver@ xot' i podderzhka anuma Unicode, bayc de zzvum em et editoric.
Kporcem qo asacov, mersi

Old 27.10.2005, 11:18   #4
Волк, просто волк...
 
_ WOLF _'s Avatar
 
Join Date: 07 2002
Location: /dev/null
Age: 81
Posts: 250
Rep Power: 0
Default

Quote:
Originally Posted by Aram Ghazanchyan
Es arden uxeci inch vor apush variantov, hex. editorov mta jnjeci et symbol@.
Voobshe-to es Notepad++ -ov ei gorc anum, Dreamweaver@ xot' i podderzhka anuma Unicode, bayc de zzvum em et editoric.
Kporcem qo asacov, mersi
et el a variant chanayts henc hajord angam text-i mej mi ban poxes inq@ noric "borshelu a"
Reply




Реклама:
реклама
Buy text link .

All times are GMT. The time now is 21:54.
Top

Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.