| Issue |
87885
|
| Summary |
[clang-format] Lines with UTF-8 characters are wrongly aligned
|
| Labels |
clang-format
|
| Assignees |
|
| Reporter |
MaJerle
|
Consider this code:
```c
#define SENSOR_DESC_1 \
"{" \
" \"~\": \"homeassistant/mycustomsensorT\"," \
" \"unit_of_measurement\": \"°C\"," \ \
"}"
```
Because of `°` character, which is `0xB0` and thus UTF-8 encoded, clang-format seems to only count bytes and not construct UTF-8 encoded length.
The same happens if you use other UTF-8 characters, like `čšž`, which are not part of ASCII.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs