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: 44
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 ($sourcefilesize ($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: 80
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
__________________
00000000h: 41 72 61 6D 20 4D 6B 68 69 74 61 72 79 61 6E;

Old 27.10.2005, 10:28   #3
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: 09 2002
Location: Yerevan
Age: 44
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: 80
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"
__________________
00000000h: 41 72 61 6D 20 4D 6B 68 69 74 61 72 79 61 6E;
Reply




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

All times are GMT. The time now is 01:39.
Top

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