Subj : Re: JS script cleanup/formatting To : Tracker1 From : Digital Man Date : Sun Nov 08 2020 01:10 pm Re: Re: JS script cleanup/formatting By: Tracker1 to Digital Man on Sat Nov 07 2020 09:44 am > On 11/6/2020 5:49 PM, Digital Man wrote: > >> writeln("\u250C\u250D\u250E\u250F"); > >> writeln("\u2510\u2511\u2512\u2513"); > >> > >> Also garbled... So probably best to do the CP437 escapes for the > >> characters, but not try to map to utf values... but should put a note to > >> maybe add character translation for unicode/ucs16/utf8 to CP437 output, > >> or as-is for unicode terminals. > > > There's no such thing as "CP437 escape", so I'm not really sure what > > you're saying. Have you actually looked at existing Synchronet .js > > modules to see how extended ASCII chars are sent? > > s/escape/translation/ > > I'm saying my expectation for the above code would be to see the line > drawing characters with jsexec in a utf-8 terminal... Yeah, that's not expected to work. Also, I don't recall there being any scripts in Synchronet which both print line drawing characters and support execution via jsexec (uifc scripts being the exception). Do you have a specific script in mind you're referring to? > I would expect to > similarly see line drawing characters in a utf-8 connected client if > console.writeln was used. I might expect to see CP437 line characters > in a terminal that wasn't utf-8. Not for Unicode characters. Synchronet assumes CP437 content by default. Other character sets (e.g. PETSCII, UNICODE) are the exception and require explicit translation steps or mode flags to be specified when using the Synchronet JS string/display methods. > >> tabs it is then... would still suggest eslint or prettier for formatting > >> configured as desired for tabs and strings. > > > Okay. > > >> Would you be willing to create an eslint config file that matches your > >> rules? Also, if an auto-format is available, does it really matter? > > > Yes, it matters. > > Was the "yes" part to the first question, or the second, or both? The second. > Aside: if you want me to just go away, please say so. I'd prefer you stick around, but maybe go easy on the "suggestions". -- digital man Synchronet/BBS Terminology Definition #29: FOSSIL = Fido/Opus/SEAdog Standard Interface Layer Norco, CA WX: 66.0øF, 69.0% humidity, 5 mph E wind, 0.00 inches rain/24hrs .