#31327 [NEW]: chinese char and word problem
From: vtsuper1 at mail dot hongkong dot com
Operating system: windowXP
PHP version: 5.0.3
PHP Bug Type: COM related
Bug description: chinese char and word problem
Description:
------------
I have try this code in
php 5.0.3 and 4.3
I'm using Chinese winXP and Chinese Office XP
apache 2
both version of php also have the same problem
When I use Chinese character in the string, the output of the word file
will have some meaningless spaces after the words I expected(my expected
string is ok, no problem). There are no problem if I using English. And
this problem will not occurs in excel.
Reproduce code:
---------------
<?php
// starting word
$word = new COM("word.application") or die("Unable to instantiate Word");
echo "Loaded Word, version {$word->Version}\n";
//bring it to front
$word->Visible = 1;
//open an empty document
$word->Documents->Add();
//do some weird stuff
$word->Selection->TypeText("§A¦n¶Ü");
$word->Documents[1]->SaveAs("Useless test.doc");
//closing word
$word->Quit();
//free the object
$word = null;
?>
Expected result:
----------------
§A¦n¶Ü
Actual result:
--------------
§A¦n¶Ü____
(there are some spaces occurs, I use the underline to repersent the
spaces)
--
Edit bug report at http://bugs.php.net/?id=31327&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31327&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=31327&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=31327&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31327&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31327&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31327&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31327&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31327&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31327&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31327&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=31327&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=31327&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31327&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31327&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31327&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31327&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31327&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31327&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31327&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31327&r=mysqlcfg
Thread (17 messages)
- vtsuper1 at mail dot hongkong dot com
- sniper@php.net#31327 [Opn->Fbk]: chinese char and word problem
- php-bugs at lists dot php dot net#31327 [Fbk->NoF]: chinese char and word problem
- vtsuper1 at mail dot hongkong dot com#31327 [NoF->Opn]: chinese char and word problem
- sniper@php.net#31327 [Opn->Fbk]: chinese char and word problem
- vtsuper1 at mail dot hongkong dot com#31327 [Fbk->Opn]: chinese char and word problem
- sniper@php.net#31327 [Opn->Asn]: chinese char and word problem
- bmcrowley at lcwarriormail dot com#31327 [Com]: chinese char and word problem
- wez@php.net#31327 [Asn->Fbk]: chinese char and word problem
- vtsuper1 at mail dot hongkong dot com#31327 [Fbk->Opn]: chinese char and word problem
- sniper@php.net#31327 [Opn->Asn]: chinese char and word problem
- vtsuper1 at mail dot hongkong dot com#31327 [Asn]: chinese char and word problem
- nong11yjyygy at yahoo dot com#31327 [Com]: chinese char and word problem
- tonyhook dot su at gmail dot com#31327 [Com]: chinese char and word problem
- wez@php.netBug #31327 [Asn->Opn]: chinese char and word problem
- katszym at gmail dot comBug #31327 [Com]: chinese char and word problem
- requinix@php.netBug #31327 [Opn->Dup]: chinese char and word problem