php-i18n Digest 21 Jan 2005 15:10:34 -0000 Issue 272

Topics (messages 835 through 837):

Re: mb_ereg_replace problem with non a-z characters
        835 by: McAjvar
        837 by: Moriyoshi Koizumi

"--zend-multibyte" as default option?
        836 by: Lapo Luchini

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
hi!

thank you for your reply and showing there's life on this list :)

Moriyoshi Koizumi wrote:
There are three possibilities:
a. Function overloading doesn't work at all on those platforms
   for an unknown reason.

   Reportedly the plain ereg_replace() malfunctions with UTF-8.

b. You are running FreeBSD on a 64 bit architecture and
   mb_ereg_replace() doesn't behave well with it.

   Recently some 64bit related bugs were addressed in mbstring,
   and there are probably ones missed still.

c. BSD's libc implementation is borked and inproperly handles
   the argument of isalnum().


To confirm those, please try the following steps:

1. Replace every ereg_replace() by mb_ereg_replace() and then run it through.

i've tried both functions, ereg_replace and mb_ereg_replace and it still only works on windows.
another friend of mine also tried the sample script in my previous mail on fedora core 2, i386 architecture. he has apache 2, php version 4.3.8 (or newer, don't know exactly).
so now i've tested this on windows and it worked. freebsd i386 - no go. dragonflybsd amd64 - no go. fedora core 2 i386 - no go. please tell me if you need any detailed info on any if the machines (although i can promptly reply only for the freebsd (and win) box as it is mine, the others aren't).

2. Run the one-liner below on a shell prompt and include the outout in the reply
to this mail:

( echo "#include <stdio.h>"; echo "#include <ctype.h>"; echo 'main() { int i; for (i = 0; i < 256; i++) { printf("%d", isalnum(i) ? 1: 0); } printf("\n"); }' ) > /var/tmp/test.c && gcc -o /var/tmp/test /var/tmp/test.c && /var/tmp/test && rm /var/tmp/test.c /var/tmp/test

this is the output on freebsd: 00000000000000000000000000000000 00000000000000001111111111000000 01111111111111111111111111100000 01111111111111111111111111100000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 i'll provide output from dragonflybsd later.

If http_input equals to internal_encoding then you don't need to turn
on encoding_translation.

i've tried again with this turned off, just to be sure i didn't mess up here, but still the same - without the "foreign" characters in mb_ereg_replace output.

thank you for help!

regards,
McAjvar

--- End Message ---
--- Begin Message ---
Hi,

On 2005/01/19, at 23:40, McAjvar wrote:

i've tried both functions, ereg_replace and mb_ereg_replace and it still only works on windows.
another friend of mine also tried the sample script in my previous mail on fedora core 2, i386 architecture. he has apache 2, php version 4.3.8 (or newer, don't know exactly).
so now i've tested this on windows and it worked. freebsd i386 - no go. dragonflybsd amd64 - no go. fedora core 2 i386 - no go. please tell me if you need any detailed info on any if the machines (although i can promptly reply only for the freebsd (and win) box as it is mine, the others aren't).

Hmm, I've been using Linux and glibc for the development of mbstring for years and I've never been in a situation like yours.

Could you send me a short and self-contained script with which I can
reproduce the problem?

2. Run the one-liner below on a shell prompt and include the outout in the reply
to this mail:
( echo "#include <stdio.h>"; echo "#include <ctype.h>"; echo 'main() { int i; for (i = 0; i < 256; i++) { printf("%d", isalnum(i) ? 1: 0); } printf("\n"); }' ) > /var/tmp/test.c && gcc -o /var/tmp/test /var/tmp/test.c && /var/tmp/test && rm /var/tmp/test.c /var/tmp/test

this is the output on freebsd: 00000000000000000000000000000000 00000000000000001111111111000000 01111111111111111111111111100000 01111111111111111111111111100000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 00000000000000000000000000000000 i'll provide output from dragonflybsd later.

Nothing seems to be going wrong with it.

If http_input equals to internal_encoding then you don't need to turn
on encoding_translation.

i've tried again with this turned off, just to be sure i didn't mess up here, but still the same - without the "foreign" characters in mb_ereg_replace output.

Actually this had little to do with your problem. It was just FYI stuff.

Regards,
Moriyoshi

--- End Message ---
--- Begin Message ---
I find it utterly useful.
I use it no FreeBSD since months, even on "big" servers such as the one
of www.m4d.it
I went to great pains to compile a custom PHP with it even on Win32 (and
use it for months on www.rockol.it, with IIS)

In short, this features seems "all good, no problems" to me.

Now I wonder... was there any serious bug report about problems
triggered by its activation?

Does naybody think it would be very bad idea to activate it by default?

Just to know if I must suffer the pains of Win32 compilation forever, eheheh
(on freebsd it's no problem to add a confgiure option before typing
"make install clean" in the ports dir, of course ;-)

  Lapo

--
L a p o   L u c h i n i
l a p o @ l a p o . i t
w w w . l a p o . i t /

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to