Re: Converting characters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 17, 2006 6:13 am, Jonas Rosling wrote:
> the PHP newbie is here again asking questions.
> Is there anyway in PHP to convert none international characters so the
> are
> displayed correct?
> In my case I have lots of data in the database with å,ä and ö.

Errrr.

Since those probably ARE the correct characters, maybe you ought to
leave them alone, and use a UTF-8 as your charset in your HTML doctype
and headers and a META tag so that they display correctly in a
browser.

If they are just total garbage charactes from, say, MS Word
copy&paste, read the User Contrib notes here:
http://php.net/str_replace for three different solutions.

You may also want to look at iconv, utf8_decode and similar PHP
functions as a last resort if you really really want to throw away the
correct characters and use ASCII characters that are not really
equivalent, but us Americans like to pretend they are. :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux