You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Hartmaier Alexander <Al...@t-systems.at> on 2006/01/12 16:58:46 UTC
UTF-8 problems with links
Hi list!
It seems that since the upgrade to embperl 2.1 a bug has been introduced when
generating links and using utf-8.
I have for example this code in one of my embperl pages:
<a
href="add-record.epl?table=raduser&subtable=raduser_dialin&defval_fk_radaccesstype=1&defval_fk_division=[+
$fk_division +]&defval_clientname=[+ $cli
entname +]&defval_zip=[+ $zip +]&defval_city=[+ $city
+]&defval_street=[+ $street +]&defval_phone=[+ $phone
+]&defval_fk_radacct_dialin=[+ $fk_radacct_dialin +
]&ignore=fk_radaccesstype">Add similar</a>
If a var inserted with [+ +] contains a german 'Umlaut' or a 'sharp S' the
link isn't ok (or maybe the handling of the encoded cgi var...).
Gerald can you help?
-Alex
RE: UTF-8 problems with links
Posted by Gerald Richter <ri...@ecos.de>.
Hi,
>
> It seems that since the upgrade to embperl 2.1 a bug has been
> introduced when generating links and using utf-8.
> I have for example this code in one of my embperl pages:
>
> <a
> href="add-record.epl?table=raduser&subtable=raduser_dialin
&defval_fk_radaccesstype=1&defval_fk_division=[+
> $fk_division +]&defval_clientname=[+ $cli entname
> +]&defval_zip=[+ $zip +]&defval_city=[+ $city
> +]&defval_street=[+ $street +]&defval_phone=[+ $phone
> +]&defval_fk_radacct_dialin=[+ $fk_radacct_dialin +
> ]&ignore=fk_radaccesstype">Add similar</a>
>
> If a var inserted with [+ +] contains a german 'Umlaut' or a
> 'sharp S' the link isn't ok (or maybe the handling of the
> encoded cgi var...).
>
Since 2.1 Embperl honours Perl's UTF-8 Flag (see
http://perl.apache.org/embperl/pod/doc/Embperl.-page-12-.htm)
So in case your variables has the UTF-8 Flag set and it isn't UTF-8
something might go wrong.
You can check if your variable has the UTF-8 set with the module
Devel::Peek.
You can turn the UTF-8 flag on and off with Encode::_utf8_on/off, but you
should know what your are doing to not create more confusion.
If this all seems to be correct, it would be great if you can create a small
example which reproduces the error
Gerald
** Virus checked by BB-5000 Mailfilter **
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org