From:             JanKarnik at atlas dot cz
Operating system: Win2K+iis
PHP version:      4.3.3
PHP Bug Type:     *General Issues
Bug description:  Include command with UTF-8 file returns undefined character 

Description:
------------
Include command with UTF-8 file returns undefined character.
Take a UTF-8 encoded php file with "include" or "require" command. Try
include a UTF-8 encoded text.
On the begining of the above include you'll get returned an undefined
character, shown in some browsers as a rectangle.
This character is used in windows to show that text has been UTF-8
encoded, but in all common editors (notepad...) is invisible.

Reproduce code:
---------------
bug.php:
<html><head><meta http-equiv="Content-Type" 
content="text/html; charset=UTF-8"></head>
<body>
<?php
<include"./text.txt">
?><body></html>


text.txt:
SOME UTF-8 ENCODED TEXT 
SOME UTF-8 ENCODED TEXT 
SOME UTF-8 ENCODED TEXT 

Expected result:
----------------
An unexpected chracters are returned 

Actual result:
--------------
?<html><head><meta http-equiv="Content-Type" 
content="text/html; charset=UTF-8"></head>
<body>
?SOME UTF-8 ENCODED TEXT 
SOME UTF-8 ENCODED TEXT 
SOME UTF-8 ENCODED TEXT <body></html>


-- 
Edit bug report at http://bugs.php.net/?id=25434&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25434&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25434&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25434&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25434&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25434&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25434&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25434&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25434&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25434&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25434&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25434&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25434&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25434&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25434&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25434&r=gnused

Reply via email to