Thread Tools Display Modes
07-12-16, 01:54 AM   #1
TimothyLuke
A Fallenroot Satyr
 
TimothyLuke's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 24
LF vs CRLF

Hi All,

I don't think this is something I can fix as opposed to something that just is but thought I'd ask the question anyway.

I am creating a multiline string to go into a multilineeditbox. The string looks like
Code:
"line1\nline2"
and renders into the multiline edit box as
Code:
line1
line2
so far so good but when I copy from that and go to notepad and press paste I get
Code:
line1line2
If I instead paste to atom i get
Code:
line1
line2
Is there a setting I can set in the string or a parameter that i can override on the widget to put in CRLF so Notepad can handle the string? Can I do something like
Code:
"line1\r\nline2"
?

Cheers in Advance.....
  Reply With Quote
07-12-16, 08:56 PM   #2
Ketho
A Pyroguard Emberseer
 
Ketho's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,026
Originally Posted by Huldrych View Post
Is there a setting I can set in the string or a parameter that i can override on the widget to put in CRLF so Notepad can handle the string? Can I do something like
Code:
"line1\r\nline2"

Don't know if there is any setting that you can override on the widget, but indeed even putting CRLF doesn't seem to work

I'm guessing that it got changed to a LF on the widget, once you try to copypaste from the EditBox widget to the clipboard and to Notepad

http://superuser.com/questions/36208...ing-linebreaks

Code:
/run MyEditBox:SetText("Hello\r\nWorld\r\nTest\r\nMessage")


No idea why it would show up as CRLF in Notepad++, maybe NP++ automatically changed it to CRLF again

Last edited by Ketho : 07-12-16 at 09:54 PM.
  Reply With Quote
07-13-16, 01:31 AM   #3
TimothyLuke
A Fallenroot Satyr
 
TimothyLuke's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 24
Thanks Ketho. I was afraid that it would be something that I couldn't adjust.

Wordpad, Notepad++ and Atom deal with LF and CRLF natively. Notepad just expects CRLF.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » LF vs CRLF


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off