You are here: Re: Getting right character-set from MySQL « PHP Programming Language « IT news, forums, messages
Re: Getting right character-set from MySQL

Posted by Andy Hassall on 10/11/23 11:26

On Sun, 11 Sep 2005 16:19:32 +0200, "Trpèiæ Ivan" <ivan.trpcic@kc.t-com.hr>
wrote:

>I put <meta http-equiv="Content-Type"
>content="text/html;charset=windows-1250"> at the HEAD section of the page,
>and all text is displayed correcty, except those fetched from MySQL
>database.

Since you are using PHP you have control over what headers are sent, so you
can send the real header instead of an unreliable <meta> tag.

header('Content-type: text/html;charset=windows-1250');

Even if this doesn't help it at least eliminates one of the likely
possibilities, that the browser is using the wrong encoding.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация