@henningw requested changes on this pull request.
Thanks for the pull-request. I reviewed the changes, but of course don't tested the multiple paths for the UTF-8 conversion with the different lengths. Two remarks from my side:
- please fix the code formatting by running "clang-format" on the changed files (as indicated from the failing test) - please move your variable definitions from inside the function to the top of the function, this is a convention we try to follow in most cases in the code (like high_surrogate, low_surrogate etc..)
Then please force-push the changes to the commit in this PR to update it here. Other developers might also comment, before it get merged in some time.