You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2000/04/11 08:17:39 UTC

RE: Embedded Perl

> From: Ken Ray [mailto:RayK@transport.nsw.gov.au]
> I am currently testing version 1.3b2, and I have come up with an
> interesting "bug" - at least I think it is a bug.  I suspect that
> any "&nbsp;" characters are somehow getting converted to spaces
> before the html file is send from Apache to the client's browser.
>  Let me explain the situation.  Each of our pages has a title
> bar, where each letter in a word has a space between them, and
> there are three "hard" spaces between each word.  For example, if
> the title line is to be "PRIVACY STATEMENT", I had previously
> encoded this as:
>
> <TD>P R I V A C Y&nbsp;&nbsp;&nbsp;S T A T E M E N
> T&nbsp;&nbsp;&nbsp;</TD>
>
> This make it clear to see.  There are also styles use to set
> colour, background and fonts.  However, despite escaping the
> output with the use of \ and $escmode=0, I cannot get this to
> generate the right html.  What I do get is:
>
> <TD class="titleline">E M B E D D E D   P E R L   </TD>
>
> there are the three spaces - but being ascii space characters and
> not the meta-character &nbsp; the browser (correctly) removes the
> extraneous spaces.
>
> The environment is Apache 1.3.11 with mod_perl 1.21 running under
> Solaris 2.6.1
>

I guess setting optRawInput (EMBPERL_OPTIONS) will solve your problem. (if
the &nbsp; are outputed by some Perl code)

See the Faq.pod and the section "Inside Embperl" in the docs for more
details.

Gerald

P.S. Please post any further questions to the Embperl mailing list

-------------------------------------------------------------
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: Embedded Perl

Posted by Gerald Richter <ri...@ecos.de>.
>
> Perhaps Gerald could set somewhere in the documentation a more prominent
> link to a small topic "inputting, parsing and outputting HTML-Strings"
> because i think, that problem will occur more often.
>

There's a whole section in the FAQ about these problems. Also the
optRawInput option is mentioned more than once in the docs, but I always
happy to include any patches that improves the documentation or the code...

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: Embedded Perl

Posted by Ulrike Schepp <u....@gigabell.net>.
Hi Ken, Hi Gerald!

On Tue, 11 Apr 2000, Gerald Richter wrote:

[...]
> > <TD class="titleline">E M B E D D E D   P E R L   </TD>

> I guess setting optRawInput (EMBPERL_OPTIONS) will solve your problem. (if
> the &nbsp; are outputed by some Perl code)

This solution works great for the problem i had yesterday! It's a bit
tricky with setting the option in a seperate [-...-] block BEFORE the
block which uses it. As a hint for Ken: For outputting HTML-Strings, you
have to set $escmode=0; before the output

> See the Faq.pod and the section "Inside Embperl" in the docs for more
> details.

Perhaps Gerald could set somewhere in the documentation a more prominent
link to a small topic "inputting, parsing and outputting HTML-Strings"
because i think, that problem will occur more often.

Regards
Ulrike
-- 
* NAMES: Ulrike Schepp                    Gigabell AG
* PHONE: [+49] [0]69 - 17084-742          D-60325 Frankfurt
* ENCR.: Key 0x5E34C939 B0 B1 ED D0 51 D1 0C 3B  82 23 2C 61 10 38 57 95
* SIGN : Key 0x59AFB1C5 59 5D 53 37 2F 79 A0 2F  27 03 F7 23 58 EE B9 6C