[Laszlo-user] Text with line feed/carriage return problem

Bryan Barkley bbarkley at gmail.com
Thu Apr 20 16:23:49 EDT 2006

I just went through an infuriatingly tedious debugging process and am hoping
that someone can shed some light on the root of the problem I faced.

I basically have an edittext component that a user can type notes into and
read/edit them later. Data was sent back and stored in the database with
carriage return (\r) characters between lines. The problem is that when
those are fetched back from the DB by the dataset the single carriage
returns were converted to a combined carriage return and line feed (\r\n).
This would show up as two lines in the app. If the user saved the text and
then opened it again, the number of blank lines would double, so you'd
eventually end up with paragraphs with a ton of newlines between them.

After a whole bunch of packet sniffing between Flash and the LPS and the LPS
and the web services used it looks like the LPS is taking single \r
characters and converting them to \r\n combos. Interestingly I found that
setting the dataset that loads the data to proxy="false" fixes the problem
because Flash doesn't do the same thing. I've tested this on Flash 8 and 7,
and am using OL 3.2.

Is there a reason the proxy server does this conversion? All the rest of our
datasets are proxied and I'd like to keep things consistent, but this
problem will force us to have at least one dataset unproxied.

     Bryan Barkley
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20060420/05daaae2/attachment.html

More information about the Laszlo-user mailing list