Page 2 of 2
Posted: Sun Feb 05, 2006 5:48 pm
by redmonkey
[quote="onejoy1"]I got:

Warning: Cannot modify header information - headers already sent by (output started at /home/users/sjg5005/http/nihongo/directory2.php:1) in /home/users/sjg5005/http/nihongo/directory2.php on line 1
ã
Posted: Sun Feb 05, 2006 6:38 pm
by onejoy1
Code: Select all
<?php header("Content-type: text/css; charset: UTF-8"); ?>
<html>
<body>
<? echo "はじめ!"; ?>
</body>
</html>
is what I put in the wordpad file.
ÿþ<?php header("Content-type: text/css; charset: UTF-8"); ?> <html> <body> <? echo "o0X0
Posted: Sun Feb 05, 2006 8:19 pm
by Gambler
I don't understand what Gambler means by save files as utf-8, unless you mean to make sure that when I save them, the encoding is set to utf-8?
Files may have different encodings. It can be, for example, ISO-8858-1, or UTF-8. If you save file in one encoding, but identify it as another, it will probably be displayed as junk. Good editors allow you to see what encoding you are using.
Posted: Sun Feb 05, 2006 9:22 pm
by timvw
Notice that you have a space before <?php ... And there should be absolutely *no* output if you use the
http://www.php.net/header function...
Posted: Mon Feb 06, 2006 3:18 pm
by eyespark
Output causing error might also be BOM (byte order mark for utf-8 ). You should save your file without BOM.
Posted: Mon Feb 06, 2006 6:50 pm
by onejoy1
Code: Select all
<?php header("Content-type: text/css; charset: UTF-8"); ?>
<html>
<body>
<? echo "はじめ!"; ?>
</body>
</html>
There is no space there, that's just how it copied.
How do I save the file without BOM?
Posted: Mon Feb 06, 2006 6:54 pm
by eyespark
If you are using DW8 there is an option when you are saving your file.
Or...
http://www.w3.org/International/questions/qa-utf8-bom
Posted: Tue Feb 07, 2006 12:08 am
by onejoy1
I'm using DW6. I can't find a way to remove the BOM. I also tried writing it in notepad and wordpad and still the characters remained.
I read somewhere that there is a script to remove the BOM if it cannot be removed manually, but I can't find a script anywhere that would do that.
Posted: Thu Feb 09, 2006 11:30 pm
by onejoy1
I'm still trying to figure out a way to save a file w/o the BOM. Can anyone help me?
Posted: Thu Feb 09, 2006 11:38 pm
by feyd
stop using Dreamweaver? You can search through the Editors thread (link can be found in the Forum Tour) for other more useful Unicode compliant editors
Posted: Fri Feb 10, 2006 2:53 am
by onejoy1
lol, I'm using dreamweaver because the other person I'm doing this project on hasn't used anything but dreamweaver before. So I have no choice..
Posted: Fri Feb 10, 2006 8:15 am
by feyd
yeah you do. What editor you use shouldn't have baring on what editor that person uses.

Posted: Fri Feb 10, 2006 11:53 am
by onejoy1
Regardless, do you know an editor that I can save without the BOM with? I looked for the editor's section but I couldn't find it.
Posted: Fri Feb 10, 2006 12:02 pm
by feyd
Posted: Fri Feb 10, 2006 12:07 pm
by onejoy1
Thanks!