• MsgBase.save_msg() and line endings

    From Nightfox@VERT/DIGDIST to Digital Man on Sunday, January 20, 2013 21:35:50
    Hi DM -

    When using MsgBase's save_msg() function, does it matter what newline character(s) are used at the end of the lines? If all the lines end with \r\n, will the message be posted with the proper newlines regardless of what platform the script/Synchronet is running in?

    Also, does Synchronet provide a JavaScript variable/property anywhere that contains the proper newline character(s) for the current platform? Or does it even matter?

    Nightfox


    ---
    Synchronet Digital Distortion BBS - digitaldistortionbbs.com
  • From Digital Man@VERT to Nightfox on Monday, January 21, 2013 23:53:23
    Re: MsgBase.save_msg() and line endings
    By: Nightfox to Digital Man on Sun Jan 20 2013 09:35 pm

    Hi DM -

    When using MsgBase's save_msg() function, does it matter what newline character(s) are used at the end of the lines? If all the lines end with \r\n, will the message be posted with the proper newlines regardless of
    what platform the script/Synchronet is running in?

    SMB has required lines be termined with "\r\n" since it's inception. One recent
    change to this is that so-called "soft carriage-returns" are now encoded as
    " \n". This is because Synchronet (as of v3.15) now rd-word-wraps messages when
    displaying via the Terminal Server (e.g. ANSI over Telnet) and we needed a distinction between auto-wrapped lines (via an editor's word-wrapping) and a so-called "hard CR" (when the author hit ENTER). See docs/WRAP.txt or ask Deuce
    for more details.

    Also, does Synchronet provide a JavaScript variable/property anywhere that contains the proper newline character(s) for the current platform? Or does it even matter?

    The new-line encoding in SMB is not specific to the "current platform" or client.

    digital man

    Synchronet "Real Fact" #60:
    How to get Synchronet technical support: http://wiki.synchro.net/howto:support Norco, CA WX: 65.6F, 8.0% humidity, 11 mph E wind, 0.00 inches rain/24hrs

    ---
    Synchronet Vertrauen Home of Synchronet [vert/cvs/bbs].synchro.net
  • From Nightfox@VERT/DIGDIST to Digital Man on Tuesday, January 22, 2013 07:46:48
    Re: MsgBase.save_msg() and line endings
    By: Digital Man to Nightfox on Mon Jan 21 2013 23:53:23

    SMB has required lines be termined with "\r\n" since it's inception. One recent change to this is that so-called "soft carriage-returns" are now encoded as
    " \n". This is because Synchronet (as of v3.15) now rd-word-wraps messages when displaying via the Terminal Server (e.g. ANSI over Telnet) and we needed a distinction between auto-wrapped lines (via an editor's word-wrapping) and a so-called "hard CR" (when the author hit ENTER). See docs/WRAP.txt or ask Deuce for more details.

    Thanks.

    Nightfox


    ---
    Synchronet Digital Distortion BBS - digitaldistortionbbs.com