Printing out a multi-word string in C is outputting incorrectly encoded characters
In my project I’m currently trying to return a HTTP response from a server to a client in C. My response character array (char*) is “HTTP/1.0 200 OKn”. I store this in a buffer with ample capacity (100 bytes). When I actually try and go to output the buffer with printf like so,
printf("%s n", buffer);
The result in my console looks something like this
HTTP/1.0Д)??
What could be the possible issue for why the entire buffer is not correctly written?