skypjack / uvw

Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!
MIT License
1.84k stars 209 forks source link

Non-UTF-8 characters in type_info.hpp #259

Closed boris-kolpackov closed 2 years ago

boris-kolpackov commented 2 years ago

The type_info.hpp header contains two characters (presumably EN-DASH from Windows-1252) in the comment on line 21:

// Fowler–Noll–Vo hash function v. 1a - the good

This prevent this library from compiling with MSVC's /utf-8 flag:

C:\tmp\build\uvw-2.10.0\uvw\src\uvw\type_info.hpp(1): error C4828: The file contains a character starting at offset 0xf2 that is illegal in the current source character set (codepage 65001).
C:\tmp\build\uvw-2.10.0\uvw\src\uvw\type_info.hpp(1): error C4828: The file contains a character starting at offset 0xf7 that is illegal in the current source character set (codepage 65001).

I would suggest replacing them with the ASCII dash/minus character (or, alternatively, with UTF-8 encoded EN-DASH if you want to go through the trouble).

skypjack commented 2 years ago

Oh, good catch. Thanks for pointing this out. 👍

boris-kolpackov commented 2 years ago

Thanks for the quick fix!