Replace unicode characters in comments with ascii

The unicode characters, while in comments and not code, caused MSVC
to emit compiler warning C4819:

  The file contains a character that cannot be represented in the
  current code page (number).  Save the file in Unicode format to
  prevent data loss.

Fix by replacing the characters in print.c with descriptive comments
containing the codepoints and symbol names, and remove the character
in brin_bloom.c which was a footnote reference copied from the paper
citation.

Per report from hamerkop in the buildfarm.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/340E4118-0D0C-4E85-8141-8C40EB22DA3A@yesql.se
This commit is contained in:
Daniel Gustafsson 2021-11-01 22:42:49 +01:00
parent e9d9ba2a4d
commit 43a134f28b
2 changed files with 91 additions and 21 deletions

View File

@ -49,7 +49,7 @@
* We use a scheme requiring only two functions described in this paper:
*
* Less Hashing, Same Performance:Building a Better Bloom Filter
* Adam Kirsch, Michael Mitzenmacher, Harvard School of Engineering and
* Adam Kirsch, Michael Mitzenmacher, Harvard School of Engineering and
* Applied Sciences, Cambridge, Massachusetts [DOI 10.1002/rsa.20208]
*
* The two hash functions h1 and h2 are calculated using hard-coded seeds,

View File

@ -140,56 +140,126 @@ typedef struct unicodeStyleFormat
static const unicodeStyleFormat unicode_style = {
{
{
/* */
/* U+2500 Box Drawings Light Horizontal */
"\342\224\200",
/* ├╟ */
/*--
* U+251C Box Drawings Light Vertical and Right,
* U+255F Box Drawings Vertical Double and Right Single
*--
*/
{"\342\224\234", "\342\225\237"},
/* ┤╢ */
/*--
* U+2524 Box Drawings Light Vertical and Left,
* U+2562 Box Drawings Vertical Double and Left Single
*--
*/
{"\342\224\244", "\342\225\242"},
},
{
/* ═ */
/* U+2550 Box Drawings Double Horizontal */
"\342\225\220",
/* ╞╠ */
/*--
* U+255E Box Drawings Vertical Single and Right Double,
* U+2560 Box Drawings Double Vertical and Right
*--
*/
{"\342\225\236", "\342\225\240"},
/* ╡╣ */
/*--
* U+2561 Box Drawings Vertical Single and Left Double,
* U+2563 Box Drawings Double Vertical and Left
*--
*/
{"\342\225\241", "\342\225\243"},
},
},
{
{
/* */
/* U+2502 Box Drawings Light Vertical */
"\342\224\202",
/* ┼╪ */
/*--
* U+253C Box Drawings Light Vertical and Horizontal,
* U+256A Box Drawings Vertical Single and Horizontal Double
*--
*/
{"\342\224\274", "\342\225\252"},
/* ┴╧ */
/*--
* U+2534 Box Drawings Light Up and Horizontal,
* U+2567 Box Drawings Up Single and Horizontal Double
*--
*/
{"\342\224\264", "\342\225\247"},
/* ┬╤ */
/*--
* U+252C Box Drawings Light Down and Horizontal,
* U+2564 Box Drawings Down Single and Horizontal Double
*--
*/
{"\342\224\254", "\342\225\244"},
},
{
/* ║ */
/* U+2551 Box Drawings Double Vertical */
"\342\225\221",
/* ╫╬ */
/*--
* U+256B Box Drawings Vertical Double and Horizontal Single,
* U+256C Box Drawings Double Vertical and Horizontal
*--
*/
{"\342\225\253", "\342\225\254"},
/* ╨╩ */
/*--
* U+2568 Box Drawings Up Double and Horizontal Single,
* U+2569 Box Drawings Double Up and Horizontal
*--
*/
{"\342\225\250", "\342\225\251"},
/* ╥╦ */
/*--
* U+2565 Box Drawings Down Double and Horizontal Single,
* U+2566 Box Drawings Double Down and Horizontal
*--
*/
{"\342\225\245", "\342\225\246"},
},
},
{
/* └│┌─┐┘ */
/*--
* U+2514 Box Drawings Light Up and Right,
* U+2502 Box Drawings Light Vertical,
* U+250C Box Drawings Light Down and Right,
* U+2500 Box Drawings Light Horizontal,
* U+2510 Box Drawings Light Down and Left,
* U+2518 Box Drawings Light Up and Left
*--
*/
{"\342\224\224", "\342\224\202", "\342\224\214", "\342\224\200", "\342\224\220", "\342\224\230"},
/* ╚║╔═╗╝ */
/*--
* U+255A Box Drawings Double Up and Right,
* U+2551 Box Drawings Double Vertical,
* U+2554 Box Drawings Double Down and Right,
* U+2550 Box Drawings Double Horizontal,
* U+2557 Box Drawings Double Down and Left,
* U+255D Box Drawings Double Up and Left
*--
*/
{"\342\225\232", "\342\225\221", "\342\225\224", "\342\225\220", "\342\225\227", "\342\225\235"},
},
" ",
"\342\206\265", /* ↵ */
/* U+21B5 Downwards Arrow with Corner Leftwards */
"\342\206\265",
" ",
"\342\206\265", /* ↵ */
"\342\200\246", /* … */
"\342\200\246", /* … */
/* U+21B5 Downwards Arrow with Corner Leftwards */
"\342\206\265",
/* U+2026 Horizontal Ellipsis */
"\342\200\246",
"\342\200\246",
true
};