From:             info at paolotozzo dot it
Operating system: WINDOWS
PHP version:      5.2.0
PHP Bug Type:     COM related
Bug description:  the dcom interface doesn't support the utf8 encoding

Description:
------------
I try to test this bug with the MS Word application, with MS Excel and
with Adobe Indesign application, but I suppose that also with other
applications the result is the same.
If I insert (with COM interface) a text with non standard encoding (like
russian language , greek language etc.), I get always strange output. I
try to change all the settings in php.ini, I try to use the mbstring and
the iconv functions, but the result is the same:
1) I get the '?' symbols
2) I get the strange output

The file .php that I use for test is saved correctly in utf-8 format
I.E. I put a greek text in a variable..if I write this variable in a text
file, it work well, but If I use this var for print an output with a com
interface, it doesn't work.
I try this with all the last php versions.

Reproduce code:
---------------
<? 
// create a reference to a new COM component (Word)
$word = new COM("word.application") or die("Can't start Word!"); 


// print the version of Word that's now in use
echo "Loading Word, v. {$word->Version}<br>"; 

// set the visibility of the application to 0 (false) 
// to open the application in the forefront, use 1 (true)
$word->Visible = 1; 

// create a new document in Word
$word->Documents->Add(); 

// add text to the new document


//in the next line I assign at $text var a greek text string
$text="ÅëëçíéêÜ";

//i try to use the mb, with many combinations of encoding
//but the result is the same if I comment this line
$text=mb_convert_encoding($text, '', "UTF-8");


//I try to write the var in a text file, and it works well
$c=fopen("test.txt","w"); 
fputs($c,($text));


$word->Selection->TypeText($text);

//save the document in the Windows temp directory


// print another message to the screen
echo "Check for the file..."; 
?> 



-- 
Edit bug report at http://bugs.php.net/?id=40355&edit=1
-- 
Try a CVS snapshot (PHP 4.4): 
http://bugs.php.net/fix.php?id=40355&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=40355&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=40355&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=40355&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=40355&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=40355&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=40355&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=40355&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=40355&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=40355&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=40355&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=40355&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=40355&r=globals
PHP 3 support discontinued:   http://bugs.php.net/fix.php?id=40355&r=php3
Daylight Savings:             http://bugs.php.net/fix.php?id=40355&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=40355&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=40355&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=40355&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=40355&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=40355&r=mysqlcfg

Reply via email to