To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=62664
------- Additional comments from [EMAIL PROTECTED] Wed Aug 23 05:38:48 -0700 2006 ------- jianhuajiao->fs: thanks your check and patience.:) >> if ( ::rtl::OUString( (sal_Unicode*)_rDest.getStr() ).getLength() != >> _rSource.getLength() ) >It creates an Unicode string from a byte array which >in real represents an encoded 8-bit-string, which will give every possible >result, but certainly not the one desired. In particular, this will access >unowned memory (and thus potentially crash) if the byte string is not >terminated with 2 zeros, but only one, since in this case there is no >terminating sal_Unicode in the array. yes, it's true. >Please replace this with a simple check of "_rDest.getLength() != ...". It can not handle the CJK charactor correctly. It will get the array's whole length, not the charactor length. and I used: sal_Int32 nLen = convertUnicodeString (_rSource, _rDest, _eEncoding); if ( nLen > _nToLength ) { to instead of old coding. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]