Closed perhapsmaple closed 1 week ago
For UTF-8 character still present, like in:
./ext/test/http/url_parser_test.cc: c program text, Unicode text, UTF-8 text
The offending source code is:
{"%C3%B6%C3%A0%C2%A7%C3%96abcd%C3%84", "öà§ÖabcdÄ"},
Instead of using the character ö
in the expected string, which corresponds to C3B6:
U+00F6 ö c3 b6 LATIN SMALL LETTER O WITH DIAERESIS
could the code be changed to use unicode escape sequences like \u00F6 instead, so all the code is UTF-8 clean.
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 87.67%. Comparing base (
497eaf4
) to head (0a8dc8d
). Report is 86 commits behind head on main.
Instead of using the character
ö
in the expected string, which corresponds to C3B6:U+00F6 ö c3 b6 LATIN SMALL LETTER O WITH DIAERESIS
could the code be changed to use unicode escape sequences like \u00F6 instead, so all the code is UTF-8 clean.
... and of course my suggestion does not work for windows / msvc for some reason (CI failures), sorry about that.
From what I could find, windows may need a std::wstring
and a L"\u00F6"
literal, but since no code in opentelemetry-cpp uses wstring currently, this is likely to open a can of worms.
A possible work around is to code the UTF-8 data instead : "\xC3\xB6", please try.
If this still fails, don't waste time on it, and remove changes from the two test files, these will be fixed separately.
Thanks
Fixes #2706
Changes
Removed Unicode characters from API headers and
opentracing-shim/src/span_shim.cc
.Escaped UTF-8 characters from test file data:
For significant contributions please make sure you have completed the following items:
CHANGELOG.md
updated for non-trivial changes