From:             
Operating system: Windows
PHP version:      5.3.6
Package:          *General Issues
Bug Type:         Bug
Bug description:echo,proc_open,... issues with UTF-8 terminal

Description:
------------
Those functions (at least) do strange things when using an UTF-8 terminal
under 

Windows.

For instance, doing a php 'echo' on a UTF-8 string does not output the
string!

Printing the same string with fwrite(STDOUT,$string) works.



More problematic : parsing UTF-8 data and trying to execute a program (I've
tried 

popen,exec,proc_open,passthru) with those data as program arguments make
the 

program to not understand the decoding that should be used.

Writing the script output to a batch file and executing the batch works. 

Test script:
---------------
Launch a cmd.exe.

Execute chcp 65001 to get the terminal use UTF-8 (make sure your font
support this, use Lucida console for instance).



Launch this script :



<?php

$data="ï";

fwrite(STDOUT,$data."\n");

echo $data."\n";

?>



Expected result:
----------------
I'm expecting UTF-8 data to be shown correctly and program execution string
passed 

to exec() and so use correct string decoding.

Actual result:
--------------
ï



��

-- 
Edit bug report at http://bugs.php.net/bug.php?id=54569&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=54569&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=54569&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=54569&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=54569&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=54569&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=54569&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=54569&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=54569&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=54569&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=54569&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=54569&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=54569&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=54569&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=54569&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=54569&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=54569&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=54569&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=54569&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=54569&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=54569&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=54569&r=mysqlcfg

Reply via email to