NetTalk Central

Author Topic: MEMOs have no CR <13> just <10>  (Read 5796 times)

Mike McLoughlin

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • Clarion Templates
    • Email
MEMOs have no CR <13> just <10>
« 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
Mike McLoughlin

kevin plummer

  • Hero Member
  • *****
  • Posts: 1195
    • View Profile
    • Production Accounting and Software Payroll
Re: MEMOs have no CR <13> just <10>
« Reply #1 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>

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: MEMOs have no CR <13> just <10>
« Reply #2 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



Mike McLoughlin

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • Clarion Templates
    • Email
Re: MEMOs have no CR <13> just <10>
« Reply #3 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


Mike McLoughlin

Mike McLoughlin

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • Clarion Templates
    • Email
Re: MEMOs have no CR <13> just <10>
« Reply #4 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
Mike McLoughlin

Mike McLoughlin

  • Full Member
  • ***
  • Posts: 126
    • View Profile
    • Clarion Templates
    • Email
Re: MEMOs have no CR <13> just <10>
« Reply #5 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
Mike McLoughlin

Johan de Klerk

  • Full Member
  • ***
  • Posts: 217
  • Johan de Klerk
    • View Profile
    • Designer Software
Re: MEMOs have no CR <13> just <10>
« Reply #6 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
Clarion 10, NT 11.57