On Mon, 9 Feb 2009 15:46:35 +0100, cr.vege...@gmail.com wrote:

> I've tested it again, from scratch with Notepad editor:
> 
> echoUTF8.php        <?php require("echoUTF8sub.php"); ?>
> echoUTF8sub.php   <?php echo "test"; ?>
> and keep getting strange characters.
> 
> Would you be so kind to run these 2 scripts on your pc ?

Works fine for me, probably because my copy of Notepad
is so old it has never heard of Unicode...

Here's another test:

echoUTF8.php:
-------------
<?php require 'echoUTF8sub.php';

echoUTF8sub.php:
----------------
<?php echo "\xef\xbb\xbf", "test\n";  // Manual BOM

When I run this from a browser, I get different output
depend on the server's and browser's default charset,
and PHP's "default_charset" setting.

I get consistent results when I add

  header ('Content-Type: text/plain; charset=utf-8');

to echoUTF8.php.


(When the scripts are run from command-line, the output
 would also depend on the shells ability to handle utf-8.)


/Nisse

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

Reply via email to