AKB Forums

Go Back   AKB Forums > Technical sections > Languages, Compilers and Interpreters > Web Development
Home Register Blogs FAQ Members List Calendar Downloads Arcade Mark Forums Read

Web Development Java/PHP/Perl/ASP and more

Troubles when posting message? Click here! :: Проблемы с отправлением сообщения? Нажмите сюда!

Reply
 
LinkBack Thread Tools Display Modes
Old Oct 27, 2005, 08:03   #1
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: Sep 2002
Location: Yerevan
Posts: 885
Rep Power: 6
Reputation: 14
Send a message via ICQ to Aram Ghazanchyan Send a message via MSN to Aram Ghazanchyan
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>Услуги предоставляются и т.д.

Что делать?
Aram Ghazanchyan is offline   Reply With Quote Quote selected
Old Oct 27, 2005, 10:11   #2
Волк, просто волк...
 
_ WOLF _'s Avatar
 
Join Date: Jul 2002
Location: /dev/null
Posts: 250
Rep Power: 7
Reputation: 10
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;
_ WOLF _ is offline   Reply With Quote Quote selected
Old Oct 27, 2005, 10:28   #3
Web developer
 
Aram Ghazanchyan's Avatar
 
Join Date: Sep 2002
Location: Yerevan
Posts: 885
Rep Power: 6
Reputation: 14
Send a message via ICQ to Aram Ghazanchyan Send a message via MSN to 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
Aram Ghazanchyan is offline   Reply With Quote Quote selected
Old Oct 27, 2005, 11:18   #4
Волк, просто волк...
 
_ WOLF _'s Avatar
 
Join Date: Jul 2002
Location: /dev/null
Posts: 250
Rep Power: 7
Reputation: 10
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;
_ WOLF _ is offline   Reply With Quote Quote selected
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Программист PHP Unregistered Jobs 4 Oct 3, 2005 10:10
PHP against ASP acid Web Development 1 Aug 6, 2004 21:30
PHP 5.0.0 Released acid Web Development 2 Jul 26, 2004 06:53
PHP remote vulnerabilities VX Software Security 0 Mar 4, 2002 19:20


All times are GMT. The time now is 14:01.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
This board was founded on September 29, 2001
Powered by Viper Internet

Affordable Web Hosting | ParevNet

Buy text link