NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Mike McLoughlin on February 26, 2017, 01:09:53 PM

Title: MEMOs have no CR <13> just <10>
Post by: Mike McLoughlin on February 26, 2017, 01:09:53 PM
Suddenly my memo fields are only saving with line feeds <10> and no CR <13>

This means they don't format properly in reports.

Anyone know what could cause this?

NT 9.19, Stringtheory 2.56 and latest C10

Mike
Title: Re: MEMOs have no CR <13> just <10>
Post by: kevin plummer on February 26, 2017, 10:38:01 PM
not sure of the cause but as a workaround you could use ST to do a search <10> and replace <13,10>
Title: Re: MEMOs have no CR <13> just <10>
Post by: Bruce on February 26, 2017, 11:02:19 PM
Different platforms use different line endings. But I've not noticed this coming through in web pages before.
Typically Windows does 13,10,  Mac does only 13, Linux only 10.
There is a method in StringTheory, LinEndings which converts them for you.
http://www.capesoft.com/docs/StringTheory/StringTheory.htm#stLineEndings

Cheers
Bruce


Title: Re: MEMOs have no CR <13> just <10>
Post by: Mike McLoughlin on February 27, 2017, 02:46:40 AM
thanks guys.

Its strange - I did a test by creating some memo text in a win32 app and when I checked it in Topscan it showed OD OA as expected.  When I opened that memo in my NT web app as soon as I saved it the memo got changed back to OA only.

Mike


Title: Re: MEMOs have no CR <13> just <10>
Post by: Mike McLoughlin on February 27, 2017, 03:34:52 AM
Bruce

Can you see anything wrong with the following:(trying to convert from <10> to <13><10>)

            tempstr8=REV:actionupdate  ! save in a string to avoid Amiguous Procedure Call msg
            ThisStringtheory4.Setvalue(tempstr8)
            ThisStringtheory4.LineEndings(st:Unix) 
            REV:actionupdate=tempstr8  ! save back to memo

I tried st:Windows as well but no success.

Mike
Title: Re: MEMOs have no CR <13> just <10>
Post by: Mike McLoughlin on February 27, 2017, 04:05:48 AM
Got it  - missed out the ThisStringTheory4.Getvalue()

Amazing number of functions in the Stringtheory toolbag :)

Very Useful

Mike
Title: Re: MEMOs have no CR <13> just <10>
Post by: Johan de Klerk on February 28, 2017, 06:14:54 AM
Hi Mike,

StringTheory is something you must have.

I had a thing/problem with importing and manipelating CSV files.
Got stuck, ask Bruce, got help, works 2000% better than I though it would work.

I use StringTheory in each and every app.
It allowed me to replace many other templates and functions that I used to use with much easier and better ones.

Regards

Johan de Klerk