Re: Re: mbstring and html encode/const structs
| From: | Steph | Date: | Fri, 02 Aug 2002 02:13:57 +0000 |
| Subject: | Re: Re: mbstring and html encode/const structs | ||
| References: | 1 2 3 4 5 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86443@lists.php.net to get a copy of this message | ||
is there any way I can use this stuff to change the way dir functions
work on doze?
(sorry C is very new to me & PHP source is mad ;)
----- Original Message -----
From: "Marcus Börger" <marcus.boerger@t-online.de>
To: "Rui Hirokawa" <rui_hirokawa@ybb.ne.jp>
Cc: <yohgaki@ohgaki.net>; <php-dev@lists.php.net>;
<tsukada@fminn.nagano.nagano.jp>; <hirokawa@php.net>
Sent: Friday, August 02, 2002 1:08 AM
Subject: Re: [PHP-DEV] Re: mbstring and html encode/const structs
Spent some more work and now it works if the internal encoding is
UTF-8. So maybe the work is worth a comit the next days after some
further testing. And the question is with or without const modifiers?
You can see what the patch does by looking at this example (UTF8):
http://marcus-boerger.de/php/ext/mbstring/mbstring-test.php.txt
and the result
http://marcus-boerger.de/php/ext/mbstring/mbstring-test.html.txt
€ ⟨ and ⟩ are both in script and get parameters
and all three are handled internally as utf-8 and all are converted
to their entity representations on output.
marcus
At 00:51 02.08.2002, Marcus Börger wrote:
>At 00:36 02.08.2002, Rui Hirokawa wrote:
>
>>Thanks,
>>It's cool!
>>
>>On Thu, 01 Aug 2002 20:29:12 +0200
>>marcus.boerger@t-online.de (Marcus B¾ÂZÓrger) wrote:
>>
>> > I have spent some more work and now i can decode HTML upon input,
too.
>> >
>> > If you set (arg_separator.input = "|") and
(mbstring.internal_encoding =
>> > ISO-8859-15) in your ini file
>> > you can do something like this:
>> > testpage.php?var=Aä€
>> > and receive $_GET['VAR'] = 'A and both ä and €
>> > decoded.
>> > This will work for post, too. So you can upload html pages decode
them and
>> > do something with it.
>>
>>But, I couldn't found arg_separator.input = "|" related code on
>>your patch.
>>arg_separator.input = "|" hasn't any side effect ?
>
>
>I did not do anythink with it simply you cannot use ';' or '&' as
argument
>separators if
>you want do decode html entities upon input.
>
>
>> > If you use HTML as output encoding and do foreach($_GET as
$idx=>$val)
>> echo
>> > $idx=$val; you will
>> > see the original input again (as expected minus | if any).
>>
>>I think using HTML as a name of output encoding is a little bit
>>confusing because almost PHP scripts output is html.
>
>
>I took that name because that is what it does: it encodes/decodes *all*
>HTML 4.01 entities.
>
>>And it't not compatible with multibyte encoding
>>which is necessary to use output encoding conversion.
>
>
>As i said i just wrote the filters and currently do not understand why
i
>cannot use
>multibyte internal encodings like UCS2 or UTF8. I had the idea that i
>simply had to
>implement html_wchar and wchar_html and then everything is fine. But i
>cannot handle
>those characters > 127....still have to invent some more work...
>
>
>AND what do you think about the const modifiers? They helped my little
bit
>during
>first modifications and make the code somethink 'safer'.
>
>
>marcus
>
>
>> >
>> > But again i have problems if internal encoding is Multibate
encoding. I
>> > have to send some
>> > search on internal handling....
>> >
>> > Anyone interested may download the patch:
>> >
http://marcus-boerger.de/php/ext/mbstring/mbstring-entities-const.patch
>> > And the additional file holding the translation table:
>> >
>> > http://marcus-boerger.de/php/ext/mbstring/html_entities.c
>> >
>> > marcus
>> >
>> > At 04:11 01.08.2002, Yasuo Ohgaki wrote:
>> > >Interesting.
>> > >
>> > >Marcus Boerger wrote:
>> > >>Anyone interested may download the patch:
>> >
>>http://marcus.boerger.de/php/ext/mbstring/mbstring-entities-const.patc
h
>> > >>And the additional file holding translation the table:
>> >
>> > >>>>http://marcus.boerger.de/php/ext/mbstring/html_entities.c
>> > >
>> > >but I cannot access to your web site....
>> > >
>> > >
>> > >--
>> > >Yasuo Ohgaki
>> > >
>> > >
>> > >--
>> > >PHP Development Mailing List <¸©ŠÏ$&Ò¶
>> > >+÷£Ÿöàhttp://www.php.net/>
>> > >To unsubscribe, visit:
>> > >http://www.php.net/unsub.php
>>
>>
>>--
>>-----------------------------------------------------
>>Rui Hirokawa <rui_hirokawa@ybb.ne.jp>
>> <hirokawa@php.net>
>
>
>--
>PHP Development Mailing List <http://www.php.net/>
>To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php