Re: The Euro symbol, default charset and htmlentities()

From: Date: Wed, 23 Jan 2002 20:41:50 +0000
Subject: Re: The Euro symbol, default charset and htmlentities()
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-81912@lists.php.net to get a copy of this message
can you not print the charset inside one of the HTML tags? (<DOCTYPE> it might be in). Also, if you dont want to keep typing out htmlentities("¤",ENT_QUOTES,"iso-8859-15") to get a euro, just do: $euro = htmlentities("¤",ENT_QUOTES,"iso-8859-15"); LJ "Sönke Tesch" <soenke@kino-fahrplan.de> wrote in message news:yam8787.2016.137840840@kino-fahrplan.de... > > Hi everybody! > > > I'm a bit lost. The original problem was (and still is) to get the Euro > symbol from a iso-8859-15 string into the HTML code output by a PHP-script > (4.0.6 by the way). > > At first it worked fine using htmlentities("¤",ENT_QUOTES,"iso-8859-15"). > However, this is a bit long, I would have plenty of htmlentities() to fix, > and since -15 should be the considered the current standard rather than > the outdated -1 it replaced, I wanted to figure out how to tell PHP and > its htmlentities() which character set to use as default. > > First question: > Where's the configuration for that? mbstring.* ini php.ini doesn't seem > to be the right place (and I didn't expect it anyway). > > > So, after learning that mbstring.* doesn't work I removed these from > php.ini and now the extended htmlentities() doesn't work anymore. The > line > > echo htmlentities("¤",ENT_QUOTES,"iso-8859-15"); > > results in a "Wrong parameter count for htmlentities()"-warning. Oops? > > Second question: > What's wrong now? I'm sure it worked earlier and I can't see that this > line is wrong anyway. htmlentities() expects upto three arguments, there > are three. > > > And, not related to a problem, the third question: > Did anybody yet consider setting iso-8859-15 as default charset throughout > PHP instead of iso-8859-1? > > > Regards, > soenk.e

« previous php.general (#81912) next »