php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31531 include or require a unicode file (php or html)
Submitted: 2005-01-13 10:25 UTC Modified: 2005-01-15 03:08 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: hieu121081 at yahoo dot com Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.3.9 OS: windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: hieu121081 at yahoo dot com
New email:
PHP Version: OS:

 

 [2005-01-13 10:25 UTC] hieu121081 at yahoo dot com
Description:
------------
I read BUG #22778, but thit problem did'n slove. so that, i decided report my problem.
I create a php or html file by notepad, and save them as utf-8.
in a other php file, sample as test.php , In this file, I use function include or require to include utf-8 file.
When i use a browser (IE) to open file test.php, i alway see in my code a spacial charactor as spuare when i view source. But i browser, sometime i see a spacial charactor as  and when i refresh that page, it'll be hidden.
This error is not big problem, but i think, if that charactor don't display, is better.

Sorry if My English not good.

Reproduce code:
---------------
This file is included (file1.php)
<?php
	$biến = "Không biết có được không?";
	echo $biến;	
?>

This file is include file above (file2.php)
<?php
	require_once("test.php");
?>


Expected result:
----------------
source HTML
{a spacial charactor display here, but i can copy it}Chào mọi người, Chúng ta bắt.Không biết có được không?



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-13 10:29 UTC] hieu121081 at yahoo dot com
I sorry, spacial is wrong, i think it is special
 [2005-01-14 03:32 UTC] jed@php.net
You might check the document you are including the file containing UTF-8 into. Is it UTF-8 as well? Character encoding mismatches may generate this behavior.

[Is this a dup of #22108?]
 [2005-01-14 04:27 UTC] sniper@php.net
See #22108

 [2005-01-15 02:44 UTC] hieu121081 at yahoo dot com
to sniper@php.net : Thank but My problem don't like #22108.
Who ran my demo code, Do you see a special charactor?
When i run it, PHP don't warning or display any error.
 [2005-01-15 03:08 UTC] hieu121081 at yahoo dot com
I upload my demo at http://www.b-webtech.com/test/test.php
code is http://www.b-webtech.com/test/test.zip
When i use IE, that special charactor appear when i view source, but when i use Firefox, It don't appear.
I save two file as utf-8
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat Jul 26 00:00:03 2025 UTC