solon Posted January 27, 2009 Share Posted January 27, 2009 Hey guys i need to 'echo' Bulgarian characters into one of my websites. It works perfectly in HTML but when the file is .php i get any other type of character than Bulgarian. If anyone now's the solution i would be grateful. Btw i used both windows-1251 and iso-8859-5 encoding as well as utf-8! Thanks in advance! Link to comment https://forums.phpfreaks.com/topic/142600-solved-bulgarian-characters-in-php/ Share on other sites More sharing options...
MadTechie Posted January 27, 2009 Share Posted January 27, 2009 if your using utf-8 correctly you should be able to just echo it Link to comment https://forums.phpfreaks.com/topic/142600-solved-bulgarian-characters-in-php/#findComment-747453 Share on other sites More sharing options...
solon Posted January 27, 2009 Author Share Posted January 27, 2009 Well what is the right way? i have this: file.html <!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="Content-Type" content="text/html; charset=windows-1251" /> <title></title> </head> <body> <div id="div"><img src="logo.jpg" alt="" /> <h1>Сайта е в процес на разработка!</h1> <p>моля посетете сайта:</p> <a href="http://www.greenvillage-sofia.com"></a> <p><strong>Адрес:</strong> 1220 София, , бул. „И, Бизнес център Сафко, ет. 3</p> <p><strong>Тел:</strong> +359 904, 931 56</p> <p><strong>Факс:</strong> +359 832 10 12</p> <p><strong>Моб.:</strong> + 359 886 60 ; + 359 0 78 86</p> <p><strong>E-mail:</strong> </p> Това е страницата на Лотарията. Трябва да изберете от 5 (пет) до 20 (двадесет) числа от първата кутия. Освен това трябва да изберете най-малко 1 (едно) число от втората кутия. </div> </body> </html> and i include it in : file.php <?php include("file.html"); ?> Note that when i browse the html file it works fine! Link to comment https://forums.phpfreaks.com/topic/142600-solved-bulgarian-characters-in-php/#findComment-747466 Share on other sites More sharing options...
MadTechie Posted January 27, 2009 Share Posted January 27, 2009 change charset=windows-1251 to charset=utf-8 or remove that whole line and try <?php header('Content-Type: text/html; charset=utf-8'); include("file.html"); ?> Link to comment https://forums.phpfreaks.com/topic/142600-solved-bulgarian-characters-in-php/#findComment-747486 Share on other sites More sharing options...
solon Posted January 27, 2009 Author Share Posted January 27, 2009 Thank you very much! it works now! Link to comment https://forums.phpfreaks.com/topic/142600-solved-bulgarian-characters-in-php/#findComment-747494 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.