[bug] unicode conversion is not working for \0 (NUL) characters #1020
Description
Since we updated to the newest cpprest version some Unicode tests are failing on our build machines. The problem is that your newest Unicode conversion methods could not deal with the control character \0 (NUL). It is a valid unicode character but cpprest throws "UTF-8 string character can never start with 10xxxxxx." Your algorithm seems to be confused with the possibility of a 00000000 character.
Additionally it would be better to have the possibility that instead of throwing an exception to replace the not working character with the replacement character (https://en.wikipedia.org/wiki/Specials_(Unicode_block)#Replacement_character). If their is a interest we can try to fix it. But before i do that i want to find out, if that is okay for the cpprest team.
Have a nice day,
Trafo
Activity