Mailing List Archive

%fdat can't handle 2bye character...
Dear.

I'm now making web script with Embperl on 2byte character envrionment.
but %fdat cannot handle 2byte characterset just like Java Servlet code
cannot handle uni-code without converting method.

for example.

<form name='profile' method='post'>
<input type=text name='c_name'>
</form>

If I input 2byte character just like Korean, Japanese, Chinese, etc...
at form variable 'c_name' on web page. the result page's $fdat{'c_name'}
value is splitted each 1byte character, and page cannot display it
properly.

Does anybody know about this problem and help me?
RE: %fdat can't handle 2bye character... [ In reply to ]
Hi,

>
> I'm now making web script with Embperl on 2byte character envrionment.
> but %fdat cannot handle 2byte characterset just like Java Servlet code
> cannot handle uni-code without converting method.
>
> for example.
>
> <form name='profile' method='post'>
> <input type=text name='c_name'>
> </form>
>
> If I input 2byte character just like Korean, Japanese, Chinese, etc...
> at form variable 'c_name' on web page. the result page's $fdat{'c_name'}
> value is splitted each 1byte character, and page cannot display it
> properly.
>

I never had the need to handle 2 byte chars, so Embperl doesn't know it
either, but if you help me, I think it should be possible to make Embperl "2
byte char aware".

So what I need is a more detailed describtion. How does the content of
QUERY_STRING look like in a two byte enironement? How must it be splitted?
Is there a way that works for 1byte chars and 2bytes chars? If not, how can
we determinate that we now handling two byte chars?

I would like to make Embperl handle these things correctly, but I have zero
knowledge about 2 byte charset, so I need your help.

Gerald



-------------------------------------------------------------
Gerald Richter ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz
E-Mail: richter@ecos.de Voice: +49 6133 925151
WWW: http://www.ecos.de Fax: +49 6133 925152
-------------------------------------------------------------
RE: %fdat can't handle 2bye character... [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 8:34 PM +0200 4/17/00, Gerald Richter wrote:
>So what I need is a more detailed describtion. How does the content of
>QUERY_STRING look like in a two byte enironement? How must it be splitted?
>Is there a way that works for 1byte chars and 2bytes chars? If not, how can
>we determinate that we now handling two byte chars?

Is it an issue with the data, or the page? Does the output page have
the correct language encoding headers?
I believe (based on more guesswork than practice) that the right way
to do this is to capture the language headers on the form submission
from the browser, and then use those when doing the output. That
could be done manually, but Embperl might capture that information
with the form info and automatically set the language if the form is
used for output (as well as allowing the user to grab it and store it
if they need to).
- --

Kee Hinckley - Somewhere Consulting Group - Cyberspace Architects(rm)

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.2 for non-commercial use <http://www.pgp.com>

iQA/AwUBOPtk1SZsPfdw+r2CEQKMNACeLONJWszBhkLxa4aUALlX6WguN9cAnipk
KeQVGExX8TmjdNHsFCmAoPaS
=fN5S
-----END PGP SIGNATURE-----