Hi all, I’m currently having a bit of a discussion with Sebastian. I would like to hear your opinion on this.
I recently updated the reader and writer to handle strings differently. Previously we simply gobbled up all bytes and converted that into a string. This resulted in the desired string to be located in the beginning, followed by a 0x00 char, which usually nobody could really display and then some times followed by garbage chars (if you’re lucky with readable characters). I made the string reader terminate the string as soon as it comes across the 0x00 byte (NULL-Byte). Now Sebastian and I are arguing a bit for and against this. He thinks I broke the RandomPackets tests (which I obviously did and we’re currently trying to figure out why the test didn’t fail on the CI … or more, why it didn’t run at all) I guess one option is to bring our mspec options into the game and simply define an option wehere we decide how we want to have string encoding handled. Question however ist: Which should be the default encoding? I would like to argue for 0-terminated strings being the default as this is what I have seen being used in every protocol I have come across. Sebasitan argues that simply interpreting all bytes of the stirng as a string should be the default. Now’s the time to ask what you folks think. Chris
