php-i18n Digest 21 May 2004 19:34:01 -0000 Issue 229

Topics (messages 702 through 718):

Re: Converting "\u00F4" style characters
        702 by: Asgeir Frimannsson
        703 by: Michael Wallner
        704 by: Asgeir Frimannsson
        705 by: Michael Wallner
        706 by: Asgeir Frimannsson
        707 by: l0t3k
        708 by: l0t3k
        709 by: Michael Wallner
        710 by: Michael Wallner
        711 by: l0t3k
        712 by: Asgeir Frimannsson
        713 by: l0t3k
        714 by: Michael Wallner
        715 by: l0t3k
        716 by: Michael Wallner
        717 by: Michael Wallner
        718 by: Moriyoshi Koizumi

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 ---
Michael Wallner wrote:
> it seems that the function doesn't work with higher
> values like "\u20AC" which is the EUR symbol :-(

Hi Mike,

it's most probably the font you're using that does not have support for the
EUR symbol. I tested the following on my box, and it displays fine:

<?php
    function unichr($hex)
    {
        $utf = '';
        $hex = hexdec((substr($hex, 0,2) === '\\u') ? substr($hex, 2) :
$hex);
        
        if ($hex < 128) {
            $utf = chr($hex);
        } elseif ($hex < 2048) {
            $utf .= chr(192 + (($hex - ($hex % 64)) / 64));
            $utf .= chr(128 + ($hex % 64));
        } else {
            $utf .= chr(224 + (($hex - ($hex % 4096)) / 4096));
            $utf .= chr(128 + ((($hex % 4096) - ($hex % 64)) / 64));
            $utf .= chr(128 + ($hex % 64));
        }
        return $utf;
    }
    header('Content-Type: text/plain; charset: utf-8');
    print unichr('\\u20AC');
?>

Most fonts (used to) only have the iso 8859-1 characters, and the EUR symbol
is only added in iso 8859-15.

Hope that solves your problem... 

Keep up the good work :)

regards,
asgeir

--- End Message ---
--- Begin Message ---
Hi Asgeir Frimannsson, you wrote:

> Michael Wallner wrote:
> 
>>it seems that the function doesn't work with higher
>>values like "\u20AC" which is the EUR symbol :-(
> 
> 
> Hi Mike,
> 
> it's most probably the font you're using that does not have support for the
> EUR symbol. I tested the following on my box, and it displays fine:
> 
> Most fonts (used to) only have the iso 8859-1 characters, and the EUR symbol
> is only added in iso 8859-15.

* mike knocks his head *
I viewed the output in the debugger window of PhpEdit,
which displayed the universal currency symbol "¤" after
iconv'ing with iso-8859-15 - should have viewed with 
Mozilla first... :)

> Hope that solves your problem... 

Well yes, but it raises another obstacle :)
Is the EUR symbol the only difference between
latin1 and latin9?  It seems at a quick glance.

> Keep up the good work :)

Thanks, I'll try at least :)

Is l0t3k still developing ext/i18n?
While google'ing I read something that he also implemented an 
ICU parser.  pearfr-org is not reachable and the my userland 
ICU parser is extremely slow (would need to integrate a cache).

However - thanks a lot again!

Regards,
-- 
Michael - < mike(@)php.net >

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Michael Wallner wrote:
>> Hope that solves your problem...
> 
> Well yes, but it raises another obstacle :)
> Is the EUR symbol the only difference between
> latin1 and latin9?  It seems at a quick glance.
It's a few other characters too.. not many though. 

> Is l0t3k still developing ext/i18n?
> While google'ing I read something that he also implemented an
> ICU parser.  pearfr-org is not reachable and the my userland
> ICU parser is extremely slow (would need to integrate a cache).
Yes, this is a very interesting project indeed. There are no changes in cvs
since october though, but I emailed him some days ago, and he said he'd
started working on it again. From browsing the code it seems like it's
quite a lot of the ICU functionality allready implemented.

What he's been doing is using the c++ implementation of ICU and mapping it
to php classes, so he's not actually creating the parsers or anything, just
porting the whole library, similar to what's done with SimpleXML. Which is
a very very good idea, and something php really needs. 

regards,
asgeir

--- End Message ---
--- Begin Message ---
Hi Asgeir Frimannsson, you wrote:

> Michael Wallner wrote:
> 
>>> Hope that solves your problem...
>> 
>> Well yes, but it raises another obstacle :) Is the EUR symbol the
>> only difference between latin1 and latin9?  It seems at a quick
>> glance.
> 
> It's a few other characters too.. not many though.

Do you know a reference?

> 
> 
>> Is l0t3k still developing ext/i18n? While google'ing I read
>> something that he also implemented an ICU parser.  pearfr-org is
>> not reachable and the my userland ICU parser is extremely slow
>> (would need to integrate a cache).
> 
> Yes, this is a very interesting project indeed. There are no changes
> in cvs since october though, but I emailed him some days ago, and he
> said he'd started working on it again. From browsing the code it
> seems like it's quite a lot of the ICU functionality allready
> implemented.

URL? 
http://www.voltex.jp/cvsweb/cvsweb.cgi/php-i18n/#dirlist 
seems to be outdated, and the checkout script is broken, too.

> What he's been doing is using the c++ implementation of ICU and
> mapping it to php classes, so he's not actually creating the parsers
> or anything, just porting the whole library, similar to what's done
> with SimpleXML. Which is a very very good idea, and something php
> really needs.

Yeah, even better!  PHP would really need it, but browsing some
mail archives it seems that he didn't get much feedback...

BTW: he => she? http://www.l0t3k.org/

Regards,
-- 
Michael - < mike(@)php.net >

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Michael Wallner wrote:

>>> Well yes, but it raises another obstacle :) Is the EUR symbol the
>>> only difference between latin1 and latin9?  It seems at a quick
>>> glance.
>> 
>> It's a few other characters too.. not many though.
> 
> Do you know a reference?

http://encyclopedia.thefreedictionary.com/ISO%208859-15

>> 
>> 
>>> Is l0t3k still developing ext/i18n? While google'ing I read
>>> something that he also implemented an ICU parser.  pearfr-org is
>>> not reachable and the my userland ICU parser is extremely slow
>>> (would need to integrate a cache).
>> 
>> Yes, this is a very interesting project indeed. There are no changes
>> in cvs since october though, but I emailed him some days ago, and he
>> said he'd started working on it again. From browsing the code it
>> seems like it's quite a lot of the ICU functionality allready
>> implemented.
> 
> URL?
> http://www.voltex.jp/cvsweb/cvsweb.cgi/php-i18n/#dirlist
> seems to be outdated, and the checkout script is broken, too.
> 
>> What he's been doing is using the c++ implementation of ICU and
>> mapping it to php classes, so he's not actually creating the parsers
>> or anything, just porting the whole library, similar to what's done
>> with SimpleXML. Which is a very very good idea, and something php
>> really needs.
> 
> Yeah, even better!  PHP would really need it, but browsing some
> mail archives it seems that he didn't get much feedback...

Yeah, i did a search, and it's kind-of sad that it didn't get more feedback,
since it would have brought php a very long step towards proper i18n. 

> BTW: he => she? http://www.l0t3k.org/

oops, sorry about that. one should never assume... 

asgeir

--- End Message ---
--- Begin Message ---
> Yes, this is a very interesting project indeed. There are no changes in
cvs
> since october though, but I emailed him some days ago, and he said he'd
> started working on it again.
i started already ;-) there were a lot of changes to be made to make it
compile with the current cvs. the challenge is also to make the classes
inheritable from PHP code (not as easy as it should be, unfortunately). i
hope by this weekend (may 22) to have a working version with some basic
tests.

> What he's been doing is using the c++ implementation of ICU and mapping it
> to php classes, so he's not actually creating the parsers or anything,
just
> porting the whole library, similar to what's done with SimpleXML.
not quite. i really wanted this to be included in the core of PHP, so i
actually ported the code from C++ (yes im a sucker for torture, but the
extension should compile anywhere PHP compiles)

l0t3k

--- End Message ---
--- Begin Message ---
"Michael Wallner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]


>> BTW: he => she? http://www.l0t3k.org/

nope. different gender, different continent <g>

l0t3k

--- End Message ---
--- Begin Message ---
Hi L0t3k, you wrote:

> i started already ;-) there were a lot of changes to be made to make
> it compile with the current cvs. the challenge is also to make the
> classes inheritable from PHP code (not as easy as it should be,
> unfortunately). i hope by this weekend (may 22) to have a working
> version with some basic tests.

Great news!  So, can the source be viewed somewhere?
I did only find a broken CVSweb (see previous posts).

>> porting the whole library, similar to what's done with SimpleXML.
> 
> not quite. i really wanted this to be included in the core of PHP, so
> i actually ported the code from C++ (yes im a sucker for torture, but
> the extension should compile anywhere PHP compiles)

Has there been any forthcoming discussion on including
ext/i18n in the PHP core?  I guess it's already much 
too late for PHP 5.0 ;-(

Cheers,
-- 
Michael - < mike(@)php.net >

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
Hi Asgeir Frimannsson, you wrote:

> Michael Wallner wrote:
>>Do you know a reference?
> http://encyclopedia.thefreedictionary.com/ISO%208859-15

Thanks, that's a great resource!

Cheers,
-- 
Michael - < mike(@)php.net >

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
"Michael Wallner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

Hi L0t3k, you wrote:

>>Great news!  So, can the source be viewed somewhere?
>>I did only find a broken CVSweb (see previous posts).
i already contacted the CVS maintainer, but i havent heard back from him
yet. if you'd like a source dump, you're quite welcome, though it currently
only compiles under Windows...

>>Has there been any forthcoming discussion on including
>>ext/i18n in the PHP core?  I guess it's already much
>>too late for PHP 5.0 ;-(
no discussions (yet). i helps to have a working, web-accessible product
first ;-> in any case it seems likely that the extension will reside (if
only initially) in PECL. the newly minted PDO (database abstraction layer)
was just posted there.

l0t3k

--- End Message ---
--- Begin Message ---
L0t3k wrote:

>>>Great news!ÂÂSo,ÂcanÂtheÂsourceÂbeÂviewedÂsomewhere?
>>>I did only find a broken CVSweb (see previous posts).
> i already contacted the CVS maintainer, but i havent heard back from him
> yet. if you'd like a source dump, you're quite welcome, though it
> currently only compiles under Windows...

Does your code compile with rc2 or cvs on windows? i wouldn't mind a source
dump to check it out... 

asgeir

--- End Message ---
--- Begin Message ---
> Does your code compile with rc2 or cvs on windows? i wouldn't mind a
source
> dump to check it out...
i built it against CVS last night, but i havent had a chance to actually
test it.  give me a day to clean some things up and and i'll send you a zip
archive.

l0t3k

--- End Message ---
--- Begin Message ---
Hi L0t3k, you wrote:

> i built it against CVS last night, but i havent had a chance to actually
> test it.  give me a day to clean some things up and and i'll send you a zip
> archive.

Would be nice if you could put the archive online somewhere.
Or checking it in to the PECL repository would be even better :)

Regards,
-- 
Michael - < mike(@)php.net >

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
"Michael Wallner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]

>>Would be nice if you could put the archive online somewhere.
i know. my only online presence was at www.pearfr.org, which seems borked at
the moment. the same goes for the CVS as voltex.
now if you'd like to provide some space temporarily ....

>>Or checking it in to the PECL repository would be even better :)
i do intend to submit it to PECL. however, i wanted to have some other eyes
scrutinize it (its ugly in spots), and ensure it builds properly under *nix
before i did so. in any case, after my work this weekend, i'll submit a
formal proposal on PECL-DEV.

l0t3k

--- End Message ---
--- Begin Message ---
Hi L0t3k, you wrote:

> "Michael Wallner" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> 
> 
>>>Would be nice if you could put the archive online somewhere.
> 
> i know. my only online presence was at www.pearfr.org, which seems borked at
> the moment. the same goes for the CVS as voltex.
> now if you'd like to provide some space temporarily ....

AFAIK Pierre shutted down this site completely...

However, I could give you a CVS account on my box,
just drop me a mail with your desired password ;-)

Regards,
-- 
Michael - < mike(@)php.net >

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---
I wrote:

> However, I could give you a CVS account on my box,
> just drop me a mail with your desired password ;-)

Ah, please use [EMAIL PROTECTED] because the mail queue
at php.net is somewhat overloaded :)

Ciao,
-- 
Michael - < mike(@)php.net >

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---
--- Begin Message ---

On 2004/05/19, at 22:44, l0t3k wrote:


"Michael Wallner" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]

Hi L0t3k, you wrote:

Great news!  So, can the source be viewed somewhere?
I did only find a broken CVSweb (see previous posts).
i already contacted the CVS maintainer, but i havent heard back from him
yet. if you'd like a source dump, you're quite welcome, though it currently
only compiles under Windows...

It should be working now. Sorry for the inconvenience.

As a sidenote, you can check out the whole source from the server
by the following set of commands:

$ cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot login
(Just press enter for the password prompt)

$ cvs -d:pserver:[EMAIL PROTECTED]:/cvsroot co php-i18n

Guys who want to take part in the development, please let me know.
I'll create cvs accounts for you.

Regards,
Moriyoshi

--- End Message ---

Reply via email to