Just as a heads up, my networking skills are close to none. I can only write some basic database management code and use HTTP, but not much more, so don’t expect me to understand everything.
Going through the topic below, the author says that most of the control characters take up 6 spaces, while " and \ take up 2. Why is this the case? Were they just remapped to avoid developers accidentally causing errors or is there another reason?
The reason I’m asking is because I currently use a simple custom data format paired with an LZW implementation for my maps, but would like to increase its effectiveness.
Its because \ is a control character, i.e its trying to convey metadata to the thing thats reading it. So what happens is you have to send some additional information to say “hey this isn’t a control character, treat it as plain text!”
I’m not dead certain about this, but I’m pretty sure thats why
But \ isn’t a control character. \ is used in many languages when creating a string, but \ itself is just a normal character that can be printed properly on every machine. By control characters I meant [NULL], [START OF HEADING], etc. Basically all the characters between 0-37 and 127.
Control characters are meant to represent something the software is supposed to accept as a command, not a simple character.
For example, NULL can be made in C and C++ with \0 and represents the end of your string. So, if your input is “test”, but without the \0 at the end, you will get something like “test23daw” when trying to print it.