For Programmers: Free Programming Magazines  


Home > Archive > PERL CGI Beginners > August 2006 > escape charachters









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author escape charachters
Adriano Allora

2006-08-11, 6:55 pm

hi all,

I use use HTML::Entities; and the functions decode() and encode(), but
I'd prefer working with escape characters (è, for example) than
working with exadecimal (or what they are:  for example).

Must I use a regexp to substitute each or I can use some other function?

Thank at all,

alladr



|^|_|^|_|^| |^|_|^|_|^|
| | | |
| | | |
| |*\_/*\_/*\_/*\_/*\_/* | |
| |
| |
| |
| http://www.e-allora.net |
| |
| |
**************************************

Paul Lalli

2006-08-11, 6:55 pm

Adriano Allora wrote:
> I use use HTML::Entities; and the functions decode() and encode()


The documentation for that module makes no mention of any such
subroutines. Did you mean decode_entities() and encode_entities()?

>, but
> I'd prefer working with escape characters (è, for example) than
> working with exadecimal (or what they are:  for example).


The documentation says that's precisely what encode_entities does. A
quick test confirms:
C:\>perl -MHTML::Entities -le"print encode_entities('<foo=E7=E9bar>')"
&lt;fooçébar&gt;
C:\>perl -MHTML::Entities -le"print encode_entities('=E8')"
è

Can you post a short-but-complete script that demonstrates the error
you're seeing?

Paul Lalli

Mumia W.

2006-08-11, 6:55 pm

On 08/11/2006 01:13 PM, Adriano Allora wrote:
> hi all,
>
> I use use HTML::Entities; and the functions decode() and encode(), but
> I'd prefer working with escape characters (è, for example) than
> working with exadecimal (or what they are:  for example).
>
> Must I use a regexp to substitute each or I can use some other function?
>
> Thank at all,
>
> alladr
> [...]


From the manual page, it seems that HTML::Entities handles
HTML entities properly. Could you show some (small) code
demonstrating your problem?


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com