[FX.php List] OT: extra spaces between words not showing up

Tim 'Webko' Booth tim at nicheit.com.au
Mon Sep 24 17:24:35 MDT 2007


At 09:09 AM 25/09/2007, you wrote:
>Greetings everyone -
>
>I just noticed a problem that I've narrowed down to NOT being 
>related to FileMaker / fx.php - but it is really causing problems 
>with my project.
>
>If    I       type    something       like      this    in      my  form
>and pass it either directly to FileMaker or to a new page in a 
>session, the extra spaces between the words are preserved 
>correctly.  However, when it is displayed (either on the next page 
>from a session or returned from a find) the extra spaces are 
>removed. (leaving it to, for example, "If I type something like this 
>in my form"...)
>
>
>My hunch is that it has something to do with my encoding  (UTF-8)

When displayed in HTML, extra whitespaces are not displayed - it's in 
the spec. Multiple spaces, tabs, returns, new lines etc are all 
shrunk down to one whitespace for display. As you note, they are 
actually there, but no browser will show them in plain HTML.

Try wrapping the returned values in <pre> tags - that should hold the 
spaces for display.

Or using a substitute to replace with the special non-breaking space 
entity for display - &nbsp;

Cheers

Webko 




More information about the FX.php_List mailing list