Re: Re: Help, It's my fault this time
By: DesotoFireflite to Nightfox on Fri Jul 22 2022 02:15 pm
Ni>> I started getting into the habit of using \x01 in any strings
Ni>> rather than using literal Ctrl-A codes. That can help prevent
Ni>> editors from changing those characters.
De> Yes, I'm starting to do that too, but some of the older ones I've done,
De> still have the leteral code, and I don't see it till I edit it, then I
De> have to go back and change it :)
Why not do a search & replace in your editor?
One caveat that I've found though is that if you're using background codes (which are numeric), I ended up splitting the string; otherwise it would interpret the nex number wrong.
For instance, if you want to output a blue background (Ctrl-A + 4), then I'd do this in JavaScript:
"\x01" + "4";
Otherwise, if you have "\x014", then that would be interpreted as hex number 14, which would be interpreted as a different character.
Nightfox
---
þ Synchronet þ Digital Distortion: digitaldistortionbbs.com
* Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
|