Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » PHP
  • » [PHP-DEV] Re: PHP's Zend multibyte support [RSS Feed]

#1 March 23, 2008 14:46:10

Marcus B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: PHP's Zend multibyte support


Hello Rui,

many thanks!!!

Sunday, March 23, 2008, 12:40:59 PM, you wrote:

> Hello Marcus,

> I try to prepare some short test scripts for zend-multibyte stuff.

> It is like,

> <?php
> declare(encoding='Shift_JIS');
> $s = "表"; // 0x95+0x5c
> printf("%x %x\n",ord($s{0}),ord($s{1})); // expected: 95 5c
?>>

> The problems to prepare the test scripts are,
> 1. php binary should be compiled with --enable-zend-multibyte option.

You can provide a --SKIPIF-- section to detect MB support
(http://qa.php.net/write-test.php).
--SKIPIF--
<?php
if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
die "skip Requires --enable-zend-multibyte option";
}
?>

> 2. the output of script is depends on mbstring.internal_encoding option.
> To obtain the expected output (95 5c in the example),
> mbstring.internal_encoding=SJIS should be defined in php.ini or
> a runtime option like,
> 'php -d mbstring.internal_encoding=SJIS test.phpt'
> mbstring.internal_encoding cannot be specified in the script by
> ini_set().

There is the --INI-- section in .phpt's (http://qa.php.net/write-test.php).
--INI--
mbstring.internal_encoding=SJIS

I have created a new directory Zend/tests/multibyte and added a first test
based on your script above. Please provide more of those.

I am CC'ing internals@ so that more people see how to write tests for it
in the hope of getting more tests.

Marcus

> On Sat, 22 Mar 2008 15:12:58 +0100
> Marcus Boerger <> wrote:

>> Hello Rui,
>>
>> what we really need is tests. If we do not get tests we will keep
>> multibyte support out of PHP. Maybe you can mail some Asian user groups who
>> probably use this feature to provide some .phpt files?
>>
>> marcus
>>
>> Tuesday, March 4, 2008, 12:06:58 AM, you wrote:
>>
>> > Johannes,
>>
>> > I send a short presentation material (php-i18n-20050227.ppt)
>> > which I made it for the meeting with Zeev.
>>
>> > Please look page 6, there are short descriptiion about the current
>> > implementation.
>>
>> > Some multibyte encodings like ShiftJIS (Japanese) and Big5 (Chinese)
>> > are including 0x5c as secodnig byte of some multibyte characters.
>> > In the current implementation, pre-scanner and after-scanner encoding
>> > conversion is applied (er. Shift-JIS -> UCS-2 -> Shift-JIS)
>> > because flex based scanner cannot handle these characters.
>>
>> > Rui
>>
>> > On Mon, 03 Mar 2008 20:43:23 +0100
>> > Johannes Schlueter <> wrote:
>>
>> >> Rui,
>> >>
>> >> as you maybe have read in Marcus and a few other guys are currently
>> >> working on replacing the flex based parser by one based on re2c. In the
>> >> current development version --enable-zend-multibyte is ignored and we
>> >> (see internals list) have no clue what exactly it is meant to do and
>> >> what won't be possible without that switch. Since you're listed as one
>> >> of the authors of zend_multibyte.c and are still working on mbstring I
>> >> was wondering if you might have some examples of stuff which won't work
>> >> without --enble-zend-multibyte, best would be .phpt tests, so we can
>> >> make sure we don't break anything if we go and replace the scanner.
>> >>
>> >> http://news.php.net/php.internals/35891>> >>
>> >> Thanks,
>> >> johannes
>> >>
>> >>




--
Best regards,
Marcus


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#2 March 23, 2008 15:26:45

Hannes M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: PHP's Zend multibyte support


2008/3/23 Marcus Boerger <>:
> Hello Rui,
>
> many thanks!!!
>
> Sunday, March 23, 2008, 12:40:59 PM, you wrote:
>
> > Hello Marcus,
>
> > I try to prepare some short test scripts for zend-multibyte stuff.
>
> > It is like,
>
> > <?php
> > declare(encoding='Shift_JIS');
> > $s = "表"; // 0x95+0x5c
> > printf("%x %x\n",ord($s{0}),ord($s{1})); // expected: 95 5c
> ?>>
>
> > The problems to prepare the test scripts are,
> > 1. php binary should be compiled with --enable-zend-multibyte option.
>
> You can provide a --SKIPIF-- section to detect MB support
> (http://qa.php.net/write-test.php).
> --SKIPIF--
> <?php
> if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
> die "skip Requires --enable-zend-multibyte option";

WTF? Where did that INI entry come from? :)

It isn't in php.ini-dist and the only docs I can find is
(http://no.php.net/manual/en/ini.php):
detect_unicode "1" PHP_INI_ALL Available since PHP 5.1.0.
Removed in PHP 6.0.0.

Is it really PHP_INI_ALL? That doesn't make much sense to me. I
thought the multibyte scanning was compile time?
(Or is it like the current short_tags proposal;
ini_set("detect_unicode"); include "..."; ?)

-Hannes

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#3 March 23, 2008 16:28:55

Johannes S.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: PHP's Zend multibyte support


Hi,

On Sun, 2008-03-23 at 15:26 +0100, Hannes Magnusson wrote:

> > You can provide a --SKIPIF-- section to detect MB support
> > (http://qa.php.net/write-test.php).
> > --SKIPIF--
> > <?php
> > if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
> > die "skip Requires --enable-zend-multibyte option";
>
> WTF? Where did that INI entry come from? :)
>
> It isn't in php.ini-dist and the only docs I can find is
> (http://no.php.net/manual/en/ini.php):
> detect_unicode "1" PHP_INI_ALL Available since PHP 5.1.0.
> Removed in PHP 6.0.0.

According to my research when the MB issues popped up that setting was
added as a hack to help the scanner to have less confusion with it's
encoding detection when using __HALT_COMPILER(); There's an internals
discussion, but i don't have it at hand right now.

> Is it really PHP_INI_ALL? That doesn't make much sense to me. I
> thought the multibyte scanning was compile time?
> (Or is it like the current short_tags proposal;
> ini_set("detect_unicode"); include "..."; ?)

Yes, it's for the latter, I guess.

johannes


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#4 March 24, 2008 16:13:54

Alan K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: PHP's Zend multibyte support


Reading through this, It looks like this is aimed at Big5/shiftJS/?maybe korean??I know from HK and probably TW, who use Big5 (traditional chineseencoding), that it's pretty much been phased out with the introductionof unicode (basically AFAIR Windows 95/98/ME/NT chinese editions usedthese encodings, latter versions of windows have used UTF8). This tendedto be an issue that old browsers on these platforms tended to need Big5encoded web pages, so alot of stuff was written at Big5.Basically I don't think these days (in the last 3 years at least) anyonedevelops sites that target Big5, (we all use UTF8) and if they do, it'sprobably only done as a last stage iconv conversion.So is there a current need for this? - or is it just a legacy issue,which could be dropped anyway for PHP6?Regards
Alan




Johannes Schlüter wrote:Hi,

On Sun, 2008-03-23 at 15:26 +0100, Hannes Magnusson wrote:You can provide a --SKIPIF-- section to detect MB support
(http://qa.php.net/write-test.php).
--SKIPIF--
<?php
if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
die "skip Requires --enable-zend-multibyte option";WTF? Where did that INI entry come from? :)

It isn't in php.ini-dist and the only docs I can find is
(http://no.php.net/manual/en/ini.php):
detect_unicode "1" PHP_INI_ALL Available since PHP 5.1.0.
Removed in PHP 6.0.0.According to my research when the MB issues popped up that setting was
added as a hack to help the scanner to have less confusion with it's
encoding detection when using __HALT_COMPILER(); There's an internals
discussion, but i don't have it at hand right now.Is it really PHP_INI_ALL? That doesn't make much sense to me. I
thought the multibyte scanning was compile time?
(Or is it like the current short_tags proposal;
ini_set("detect_unicode"); include "..."; ?)Yes, it's for the latter, I guess.

johannes--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#5 March 24, 2008 16:19:22

Marcus B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: PHP's Zend multibyte support


Hello Alan,

that is basically my impression. Although I did not look into who might
be using what in particular. Either way the feature is fully dropped in
HEAD.

marcus

Monday, March 24, 2008, 4:12:54 PM, you wrote:

> Reading through this, It looks like this is aimed at Big5/shiftJS/?
> maybe korean??

> I know from HK and probably TW, who use Big5 (traditional chinese
> encoding), that it's pretty much been phased out with the introduction
> of unicode (basically AFAIR Windows 95/98/ME/NT chinese editions used
> these encodings, latter versions of windows have used UTF8). This tended
> to be an issue that old browsers on these platforms tended to need Big5
> encoded web pages, so alot of stuff was written at Big5.

> Basically I don't think these days (in the last 3 years at least) anyone
> develops sites that target Big5, (we all use UTF8) and if they do, it's
> probably only done as a last stage iconv conversion.

> So is there a current need for this? - or is it just a legacy issue,
> which could be dropped anyway for PHP6?

> Regards
> Alan




> Johannes Schlüter wrote:
>> Hi,
>>
>> On Sun, 2008-03-23 at 15:26 +0100, Hannes Magnusson wrote:
>>
>>
>>>> You can provide a --SKIPIF-- section to detect MB support
>>>> (http://qa.php.net/write-test.php).
>>>> --SKIPIF--
>>>> <?php
>>>> if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
>>>> die "skip Requires --enable-zend-multibyte option";
>>>>
>>> WTF? Where did that INI entry come from? :)
>>>
>>> It isn't in php.ini-dist and the only docs I can find is
>>> (http://no.php.net/manual/en/ini.php):
>>> detect_unicode "1" PHP_INI_ALL Available since PHP 5.1.0.
>>> Removed in PHP 6.0.0.
>>>
>>
>> According to my research when the MB issues popped up that setting was
>> added as a hack to help the scanner to have less confusion with it's
>> encoding detection when using __HALT_COMPILER(); There's an internals
>> discussion, but i don't have it at hand right now.
>>
>>
>>> Is it really PHP_INI_ALL? That doesn't make much sense to me. I
>>> thought the multibyte scanning was compile time?
>>> (Or is it like the current short_tags proposal;
>>> ini_set("detect_unicode"); include "..."; ?)
>>>
>>
>> Yes, it's for the latter, I guess.
>>
>> johannes
>>
>>
>>





Best regards,
Marcus


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#6 March 24, 2008 23:16:03

Andi G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: PHP's Zend multibyte support


I think many of these encodings are still very much alive. I am pretty sure
that still a large amount of the Japanese market uses Shift-JIS. The majority
of the tools/text editors use this format as opposed to UTF-8.

Andi

> -----Original Message-----
> From: Alan Knowles
> Sent: Monday, March 24, 2008 8:13 AM
> To: Johannes Schlüter
> Cc: Hannes Magnusson; Marcus Boerger; Rui Hirokawa;
> intern***@*ists.php.net
> Subject: Re: Re: PHP's Zend multibyte support
>
> Reading through this, It looks like this is aimed at Big5/shiftJS/?
> maybe korean??
>
> I know from HK and probably TW, who use Big5 (traditional chinese
> encoding), that it's pretty much been phased out with the introduction
> of unicode (basically AFAIR Windows 95/98/ME/NT chinese editions used
> these encodings, latter versions of windows have used UTF8). This
> tended
> to be an issue that old browsers on these platforms tended to need Big5
> encoded web pages, so alot of stuff was written at Big5.
>
> Basically I don't think these days (in the last 3 years at least)
> anyone
> develops sites that target Big5, (we all use UTF8) and if they do, it's
> probably only done as a last stage iconv conversion.
>
> So is there a current need for this? - or is it just a legacy issue,
> which could be dropped anyway for PHP6?
>
> Regards
> Alan
>
>
>
>
> Johannes Schlüter wrote:
> > Hi,
> >
> > On Sun, 2008-03-23 at 15:26 +0100, Hannes Magnusson wrote:
> >
> >
> >>> You can provide a --SKIPIF-- section to detect MB support
> (http://qa.php.net/write-test.php).
> >>> --SKIPIF--
> >>> <?php
> >>> if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
> >>> die "skip Requires --enable-zend-multibyte option";
> >>>
> >> WTF? Where did that INI entry come from? :)
> >>
> >> It isn't in php.ini-dist and the only docs I can find is
> >> (http://no.php.net/manual/en/ini.php):
> >> detect_unicode "1" PHP_INI_ALL Available since PHP
> 5.1.0.
> >> Removed in PHP 6.0.0.
> >>
> >
> > According to my research when the MB issues popped up that setting
> was
> > added as a hack to help the scanner to have less confusion with it's
> > encoding detection when using __HALT_COMPILER(); There's an internals
> > discussion, but i don't have it at hand right now.
> >
> >
> >> Is it really PHP_INI_ALL? That doesn't make much sense to me. I
> >> thought the multibyte scanning was compile time?
> >> (Or is it like the current short_tags proposal;
> >> ini_set("detect_unicode"); include "..."; ?)
> >>
> >
> > Yes, it's for the latter, I guess.
> >
> > johannes
> >
> >
> >
>
>
> --
> PHP Internals - PHP Runtime Development Mailing List
> To unsubscribe, visit:http://www.php.net/unsub.php--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#7 March 25, 2008 00:37:31

Marcus B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: PHP's Zend multibyte support


Hello Andi,

claiming you have heard doesn't bring us any further though. Please
provide tests other wise I cannot fix and reimplement what is there. Right
now I only got one extremely basic test that only checks for a very very
limited part of what the stuff is designed for.

marcus

Monday, March 24, 2008, 11:15:21 PM, you wrote:

> I think many of these encodings are still very much alive. I am pretty
> sure that still a large amount of the Japanese market uses Shift-JIS. The
> majority of the tools/text editors use this format as opposed to UTF-8.

> Andi

>> -----Original Message-----
>> From: Alan Knowles
>> Sent: Monday, March 24, 2008 8:13 AM
>> To: Johannes Schlüter
>> Cc: Hannes Magnusson; Marcus Boerger; Rui Hirokawa;
>> intern***@*ists.php.net
>> Subject: Re: Re: PHP's Zend multibyte support
>>
>> Reading through this, It looks like this is aimed at Big5/shiftJS/?
>> maybe korean??
>>
>> I know from HK and probably TW, who use Big5 (traditional chinese
>> encoding), that it's pretty much been phased out with the introduction
>> of unicode (basically AFAIR Windows 95/98/ME/NT chinese editions used
>> these encodings, latter versions of windows have used UTF8). This
>> tended
>> to be an issue that old browsers on these platforms tended to need Big5
>> encoded web pages, so alot of stuff was written at Big5.
>>
>> Basically I don't think these days (in the last 3 years at least)
>> anyone
>> develops sites that target Big5, (we all use UTF8) and if they do, it's
>> probably only done as a last stage iconv conversion.
>>
>> So is there a current need for this? - or is it just a legacy issue,
>> which could be dropped anyway for PHP6?
>>
>> Regards
>> Alan
>>
>>
>>
>>
>> Johannes Schlüter wrote:
>> > Hi,
>> >
>> > On Sun, 2008-03-23 at 15:26 +0100, Hannes Magnusson wrote:
>> >
>> >
>> >>> You can provide a --SKIPIF-- section to detect MB support
>> (http://qa.php.net/write-test.php).
>> >>> --SKIPIF--
>> >>> <?php
>> >>> if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
>> >>> die "skip Requires --enable-zend-multibyte option";
>> >>>
>> >> WTF? Where did that INI entry come from? :)
>> >>
>> >> It isn't in php.ini-dist and the only docs I can find is
>> >> (http://no.php.net/manual/en/ini.php):
>> >> detect_unicode "1" PHP_INI_ALL Available since PHP
>> 5.1.0.
>> >> Removed in PHP 6.0.0.
>> >>
>> >
>> > According to my research when the MB issues popped up that setting
>> was
>> > added as a hack to help the scanner to have less confusion with it's
>> > encoding detection when using __HALT_COMPILER(); There's an internals
>> > discussion, but i don't have it at hand right now.
>> >
>> >
>> >> Is it really PHP_INI_ALL? That doesn't make much sense to me. I
>> >> thought the multibyte scanning was compile time?
>> >> (Or is it like the current short_tags proposal;
>> >> ini_set("detect_unicode"); include "..."; ?)
>> >>
>> >
>> > Yes, it's for the latter, I guess.
>> >
>> > johannes
>> >
>> >
>> >
>>
>>
>> --
>> PHP Internals - PHP Runtime Development Mailing List
>> To unsubscribe, visit:http://www.php.net/unsub.phpBest regards,
Marcus


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#8 March 25, 2008 01:35:22

Andi G.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: PHP's Zend multibyte support


Yes I understand but unfortunately I don't speak Japanese. Rui, is it possible
for you to try and get more involvement from the team that worked on this and
get more tests?

Btw, I think if we use the existing infrastructure Rui and the team built (see
no big reason why not for 5.3) then we can also go somewhat lighter on the
amount of testing as there'll be less chances for breakage.

Andi

> -----Original Message-----
> From: Marcus Boerger
> Sent: Monday, March 24, 2008 4:36 PM
> To: Andi Gutmans
> Cc: Alan Knowles; Johannes Schlüter; Hannes Magnusson; Rui Hirokawa;
> intern***@*ists.php.net
> Subject: Re: Re: PHP's Zend multibyte support
>
> Hello Andi,
>
> claiming you have heard doesn't bring us any further though. Please
> provide tests other wise I cannot fix and reimplement what is there.
> Right
> now I only got one extremely basic test that only checks for a very
> very
> limited part of what the stuff is designed for.
>
> marcus
>
> Monday, March 24, 2008, 11:15:21 PM, you wrote:
>
> > I think many of these encodings are still very much alive. I am
> pretty
> > sure that still a large amount of the Japanese market uses Shift-JIS.
> The
> > majority of the tools/text editors use this format as opposed to UTF-
> 8.
>
> > Andi
>
> >> -----Original Message-----
> >> From: Alan Knowles
> >> Sent: Monday, March 24, 2008 8:13 AM
> >> To: Johannes Schlüter
> >> Cc: Hannes Magnusson; Marcus Boerger; Rui Hirokawa;
> >> intern***@*ists.php.net
> >> Subject: Re: Re: PHP's Zend multibyte support
> >>
> >> Reading through this, It looks like this is aimed at Big5/shiftJS/?
> >> maybe korean??
> >>
> >> I know from HK and probably TW, who use Big5 (traditional chinese
> >> encoding), that it's pretty much been phased out with the
> introduction
> >> of unicode (basically AFAIR Windows 95/98/ME/NT chinese editions
> used
> >> these encodings, latter versions of windows have used UTF8). This
> >> tended
> >> to be an issue that old browsers on these platforms tended to need
> Big5
> >> encoded web pages, so alot of stuff was written at Big5.
> >>
> >> Basically I don't think these days (in the last 3 years at least)
> >> anyone
> >> develops sites that target Big5, (we all use UTF8) and if they do,
> it's
> >> probably only done as a last stage iconv conversion.
> >>
> >> So is there a current need for this? - or is it just a legacy issue,
> >> which could be dropped anyway for PHP6?
> >>
> >> Regards
> >> Alan
> >>
> >>
> >>
> >>
> >> Johannes Schlüter wrote:
> >> > Hi,
> >> >
> >> > On Sun, 2008-03-23 at 15:26 +0100, Hannes Magnusson wrote:
> >> >
> >> >
> >> >>> You can provide a --SKIPIF-- section to detect MB support
> >> (http://qa.php.net/write-test.php).
> >> >>> --SKIPIF--
> >> >>> <?php
> >> >>> if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
> >> >>> die "skip Requires --enable-zend-multibyte option";
> >> >>>
> >> >> WTF? Where did that INI entry come from? :)
> >> >>
> >> >> It isn't in php.ini-dist and the only docs I can find is
> >> >> (http://no.php.net/manual/en/ini.php):
> >> >> detect_unicode "1" PHP_INI_ALL Available since PHP
> >> 5.1.0.
> >> >> Removed in PHP 6.0.0.
> >> >>
> >> >
> >> > According to my research when the MB issues popped up that setting
> >> was
> >> > added as a hack to help the scanner to have less confusion with
> it's
> >> > encoding detection when using __HALT_COMPILER(); There's an
> internals
> >> > discussion, but i don't have it at hand right now.
> >> >
> >> >
> >> >> Is it really PHP_INI_ALL? That doesn't make much sense to me. I
> >> >> thought the multibyte scanning was compile time?
> >> >> (Or is it like the current short_tags proposal;
> >> >> ini_set("detect_unicode"); include "..."; ?)
> >> >>
> >> >
> >> > Yes, it's for the latter, I guess.
> >> >
> >> > johannes
> >> >
> >> >
> >> >
> >>
> >>
> >> --
> >> PHP Internals - PHP Runtime Development Mailing List
> >> To unsubscribe, visit:http://www.php.net/unsub.php>
>
>
> Best regards,
> Marcus


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

#9 March 25, 2008 01:51:13

Marcus B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[PHP-DEV] Re: PHP's Zend multibyte support


Hello Andi,

good, and sorry but I really need more tests. Especially some that show
how we do with all the different BOMs.

marcus

Tuesday, March 25, 2008, 1:35:03 AM, you wrote:

> Yes I understand but unfortunately I don't speak Japanese. Rui, is it
> possible for you to try and get more involvement from the team that worked on
> this and get more tests?

> Btw, I think if we use the existing infrastructure Rui and the team built
> (see no big reason why not for 5.3) then we can also go somewhat lighter
> on the amount of testing as there'll be less chances for breakage.

> Andi

>> -----Original Message-----
>> From: Marcus Boerger
>> Sent: Monday, March 24, 2008 4:36 PM
>> To: Andi Gutmans
>> Cc: Alan Knowles; Johannes Schlüter; Hannes Magnusson; Rui Hirokawa;
>> intern***@*ists.php.net
>> Subject: Re: Re: PHP's Zend multibyte support
>>
>> Hello Andi,
>>
>> claiming you have heard doesn't bring us any further though. Please
>> provide tests other wise I cannot fix and reimplement what is there.
>> Right
>> now I only got one extremely basic test that only checks for a very
>> very
>> limited part of what the stuff is designed for.
>>
>> marcus
>>
>> Monday, March 24, 2008, 11:15:21 PM, you wrote:
>>
>> > I think many of these encodings are still very much alive. I am
>> pretty
>> > sure that still a large amount of the Japanese market uses Shift-JIS.
>> The
>> > majority of the tools/text editors use this format as opposed to UTF-
>> 8.
>>
>> > Andi
>>
>> >> -----Original Message-----
>> >> From: Alan Knowles
>> >> Sent: Monday, March 24, 2008 8:13 AM
>> >> To: Johannes Schlüter
>> >> Cc: Hannes Magnusson; Marcus Boerger; Rui Hirokawa;
>> >> intern***@*ists.php.net
>> >> Subject: Re: Re: PHP's Zend multibyte support
>> >>
>> >> Reading through this, It looks like this is aimed at Big5/shiftJS/?
>> >> maybe korean??
>> >>
>> >> I know from HK and probably TW, who use Big5 (traditional chinese
>> >> encoding), that it's pretty much been phased out with the
>> introduction
>> >> of unicode (basically AFAIR Windows 95/98/ME/NT chinese editions
>> used
>> >> these encodings, latter versions of windows have used UTF8). This
>> >> tended
>> >> to be an issue that old browsers on these platforms tended to need
>> Big5
>> >> encoded web pages, so alot of stuff was written at Big5.
>> >>
>> >> Basically I don't think these days (in the last 3 years at least)
>> >> anyone
>> >> develops sites that target Big5, (we all use UTF8) and if they do,
>> it's
>> >> probably only done as a last stage iconv conversion.
>> >>
>> >> So is there a current need for this? - or is it just a legacy issue,
>> >> which could be dropped anyway for PHP6?
>> >>
>> >> Regards
>> >> Alan
>> >>
>> >>
>> >>
>> >>
>> >> Johannes Schlüter wrote:
>> >> > Hi,
>> >> >
>> >> > On Sun, 2008-03-23 at 15:26 +0100, Hannes Magnusson wrote:
>> >> >
>> >> >
>> >> >>> You can provide a --SKIPIF-- section to detect MB support
>> >> (http://qa.php.net/write-test.php).
>> >> >>> --SKIPIF--
>> >> >>> <?php
>> >> >>> if (!in_array("detect_unicode", array_keys(ini_get_all()))) {
>> >> >>> die "skip Requires --enable-zend-multibyte option";
>> >> >>>
>> >> >> WTF? Where did that INI entry come from? :)
>> >> >>
>> >> >> It isn't in php.ini-dist and the only docs I can find is
>> >> >> (http://no.php.net/manual/en/ini.php):
>> >> >> detect_unicode "1" PHP_INI_ALL Available since PHP
>> >> 5.1.0.
>> >> >> Removed in PHP 6.0.0.
>> >> >>
>> >> >
>> >> > According to my research when the MB issues popped up that setting
>> >> was
>> >> > added as a hack to help the scanner to have less confusion with
>> it's
>> >> > encoding detection when using __HALT_COMPILER(); There's an
>> internals
>> >> > discussion, but i don't have it at hand right now.
>> >> >
>> >> >
>> >> >> Is it really PHP_INI_ALL? That doesn't make much sense to me. I
>> >> >> thought the multibyte scanning was compile time?
>> >> >> (Or is it like the current short_tags proposal;
>> >> >> ini_set("detect_unicode"); include "..."; ?)
>> >> >>
>> >> >
>> >> > Yes, it's for the latter, I guess.
>> >> >
>> >> > johannes
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> PHP Internals - PHP Runtime Development Mailing List
>> >> To unsubscribe, visit:http://www.php.net/unsub.php>>
>>
>>
>> Best regards,
>> Marcus





Best regards,
Marcus


--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit:http://www.php.net/unsub.php

Offline

  • Root
  • » PHP
  • » [PHP-DEV] Re: PHP's Zend multibyte support [RSS Feed]

Board footer

Moderator control

Enjoy the 16th of December
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support