Ⓙⓐⓚⓔ schrieb:
the server should put a charset in every reply... if it doesn't it is
certainly not utf.... more like a messy ascii mishmosh!
black diamonds are high ascii characters where a utf should be...
to survive in the utf world, your apache should send everything as utf-8
i use dreamweaver to write my bits and bytes and since i upgraded to CS3
it reset/messed the 'new-document' settings thingy. i unchecked BOM
insertion and set it to no-unicode-whatever (they translated this to
"Unicode-Normalisierungsformular" which sounds quite wrong to me :-))
however that didn't quite do the job.
now i'm reading the file in doing a:
$PATH = $_SERVER['HTTP_HOST'] . substr (dirname( $_SERVER['PHP_SELF'] ),
0, -3);
$filename = 'my.js';
$filehandle = fopen ($filename, 'r');
$file = fread ($filehandle, filesize ($filename));
print (str_replace('{$PATH}', $PATH, $file));
and everything seems to be correctly encoded ... phhhhh! what a mess.
micha