Re: Converting characters

From: Date: Fri, 19 May 2006 00:23:07 +0000
Subject: Re: Converting characters
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-236464@lists.php.net to get a copy of this message
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

« previous php.general (#236464) next »