php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40072 UTF8 file include output return unknow character.
Submitted: 2007-01-09 04:41 UTC Modified: 2007-01-09 11:51 UTC
From: plasmapermanent at msn dot com Assigned:
Status: Closed Package: Output Control
PHP Version: 5.2.0 OS: Windows XP SP2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: plasmapermanent at msn dot com
New email:
PHP Version: OS:

 

 [2007-01-09 04:41 UTC] plasmapermanent at msn dot com
Description:
------------
I use all file in utf8 format. All thing look like good work. But when include utf8 file it have something wrong. My table move to bottom of page. I try to view source. It is very simple HTML code. No where wrong code. But it have more space separate from header. I try to check all it appear because I use code like this. Another place display true (May be).

Reproduce code:
---------------
if(!empty($headtemp)) include($path.'\\'.$headtemp);
if(!empty($toptemp)) include($path.'\\'.$toptemp);
for($$linenum=0;$$linenum<$$x;$$linenum++){
	mysql_data_seek($$datacontain,$$linenum);
	$$returnnm=mysql_fetch_array($$datacontain);
	if(!empty($midtemp)) include($path.'\\'.$midtemp);
}


Expected result:
----------------
Result when display should be true.

Actual result:
--------------
Result display when I view source of page are ok.
But page display should be ok like source code.

Now it show like.

<table border=1>
?<tr>
<td>1</td>
</tr>
?<tr>
<td>2</td>
</tr>
?<tr>
<td>3</td>
</tr>
</table>

? is something wrong.
It made table lose structure it data display on bottom of page and have space between start tag <table> and data.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-01-09 08:32 UTC] derick@php.net
Tell your editor not to safe the file with the BOM prepended.
 [2007-01-09 11:51 UTC] plasmapermanent at msn dot com
How to clear this problem. Just save file in utf-8 by don't have BOM. How to know your file have BOM or not? Try to use notepad2 change (File > Encoding) from "UTF-8 With Signature" to "UTF-8" and save it. Notepad2 download from http://www.flos-freeware.ch/. It's freeware.

Thank you to clear this problem.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 19:01:28 2024 UTC