note 26579 deleted from function.urlencode by tularis
| From: | tularis@php.net | Date: | Sun, 19 Dec 2004 09:43:06 +0000 |
| Subject: | note 26579 deleted from function.urlencode by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-82020@lists.php.net to get a copy of this message | ||
Note Submitter: leckermatz attt yahoo dottt de
----
Addendum: In Flash 6 there finally is a working method of passing special characters into a flash
movie.In order to do this, the php file which generaes the output (an is adressen in flash via the
"loadVariables" action) must be saved as an UTF-8 encoded file. By doing so, the file will
gain an BOM and will be properly recognized as UTF8-encoded by the flash movie.
Now all you need to do is something like
echo "textvar=".urlencode(utf8_encode("lots of special chars: äöü..."));
and that should work fine.
another thing:
Flash interprets both \r and \n as newline commands. Therefore ot will insert 2 line breaks whenever
there is only one. i.e., nl2br($string) will NOT work properly. Better use a function that will
replace "\n" values from your database with "<br />" rather than
"<br />\r", as nl2br would do. Example:
function nltobr($input)
{
$input=nl2br($input);
$input=str_replace("\r","",$input);
return $input;
}