[PHP-DEV] Bug #13017: mb_strimwidth() - null character in result

2001-08-29 Thread tsukada

From: [EMAIL PROTECTED]
Operating system: Redhat 7.1
PHP version:  4.0CVS-2001-08-29
PHP Bug Type: Unknown/Other Function
Bug description:  mb_strimwidth()  - null character in result

In some case, mb_strimwidth() add null character to tail of result.

Script:

?php
   echo bin2hex( mb_strimwidth('abcdef', 0, 6, '..') );
?


Result:

  61626364656600


Patch:

===
RCS file: /repository/php4/ext/mbstring/mbfilter.c,v
retrieving revision 1.15
diff -u -r1.15 mbfilter.c
--- mbfilter.c  28 Aug 2001 21:50:29 -  1.15
+++ mbfilter.c  29 Aug 2001 07:16:54 -
@@ -7061,10 +7061,10 @@
n = string-len;
if (p != NULL) {
while (n  0) {
+   n--;
if ((*encoder-filter_function)(*p++, encoder)  0)
{
break;
}
-   n--;
}
mbfl_convert_filter_flush(encoder);
if (pc.status != 0  mkwidth  0) {



-- 
Edit bug report at: http://bugs.php.net/?id=13017edit=1


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] 4.0.6

2001-04-30 Thread tsukada


On Mon, 30 Apr 2001 18:27:26 +0300
Andi Gutmans wrote:

 At 12:23 AM 5/1/2001 +0900, Rui Hirokawa wrote:
 
 On Mon, 30 Apr 2001 17:26:58 +0300
 Andi Gutmans [EMAIL PROTECTED] wrote:
 
   At 10:01 PM 4/29/2001 -0400, Sterling Hughes wrote:
   ext/wchar (wide character support?)
   ext/mstring (multibyte string functions)
   ext/jpstring (japanese string functions)
  
   I'd make mstring - mbstring.
   The question is if it's worth splitting this up into more than one
   extension. Probably not.
   So we should probably be picking out of wchar, mbstring, jpstring.
   Rui, what do you think?
 
 I prefer unified approach is better for php-i18n than splitting
 some modules.
 I think mbstring is better, although this module also
 supports single-byte encoding like ISO-8859-X.
 Some people might say 'wchar' is better choise,
 because this module converts string to wide character internally.
 
 If someone want to add some other encoding support,
 he should add mbfilter_xx.c mbfilter_xx.h where xx means some
 specific language like ja (japanese).
 
 Anyway, because I am not original author of this module,
 I must discuss to Mr. Tsukada ,the original author of jstring
 about renaming the module.
 
 OK. I think wchar or mbstring are both good. jstring will just confuse people.
 

I think mbstring is nice.

 Takuya Tsukada



-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DEV] Re: about users of japanese localized php3

2001-03-04 Thread tsukada

Hello.

I am Takuya Tsukada. I wrote of some Japanese module for PHP. 
I would like to commit the Japanese extention to CVS.
So, Will you be able to have me issue a CVS account?



 At 01:10 AM 3/3/2001 +0900, Rui Hirokawa wrote:
 Currently, I am working to make some patch for php4/main/php_variables.c
 to add the encoding translation capability using ext/jstring made by
 Mr. Tsukada supporting japanese characters handling functions.
 
 Great. Interesting to see what you guys can come up with.
 If your work is extendible to support other languages that have the same 
 problem (there must be others) that would be even better.
 
 Andi
 
 


-- 
sender: Tsukada Takuya
town: inaba hizume, Nagano City


-- 
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]