Skip to content

[bug] unicode conversion is not working for \0 (NUL) characters #1020

Closed
@Trafo

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions