Skip to content

Commit 43a134f

Browse files
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
1 parent e9d9ba2 commit 43a134f

File tree

2 files changed

+91
-21
lines changed

2 files changed

+91
-21
lines changed

src/backend/access/brin/brin_bloom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
* We use a scheme requiring only two functions described in this paper:
5050
*
5151
* Less Hashing, Same Performance:Building a Better Bloom Filter
52-
* Adam Kirsch, Michael Mitzenmacher, Harvard School of Engineering and
52+
* Adam Kirsch, Michael Mitzenmacher, Harvard School of Engineering and
5353
* Applied Sciences, Cambridge, Massachusetts [DOI 10.1002/rsa.20208]
5454
*
5555
* The two hash functions h1 and h2 are calculated using hard-coded seeds,

src/fe_utils/print.c

Lines changed: 90 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -140,56 +140,126 @@ typedef struct unicodeStyleFormat
140140
static const unicodeStyleFormat unicode_style = {
141141
{
142142
{
143-
/* */
143+
/* U+2500 Box Drawings Light Horizontal */
144144
"\342\224\200",
145-
/* ├╟ */
145+
146+
/*--
147+
* U+251C Box Drawings Light Vertical and Right,
148+
* U+255F Box Drawings Vertical Double and Right Single
149+
*--
150+
*/
146151
{"\342\224\234", "\342\225\237"},
147-
/* ┤╢ */
152+
153+
/*--
154+
* U+2524 Box Drawings Light Vertical and Left,
155+
* U+2562 Box Drawings Vertical Double and Left Single
156+
*--
157+
*/
148158
{"\342\224\244", "\342\225\242"},
149159
},
150160
{
151-
/* */
161+
/* U+2550 Box Drawings Double Horizontal */
152162
"\342\225\220",
153-
/* ╞╠ */
163+
164+
/*--
165+
* U+255E Box Drawings Vertical Single and Right Double,
166+
* U+2560 Box Drawings Double Vertical and Right
167+
*--
168+
*/
154169
{"\342\225\236", "\342\225\240"},
155-
/* ╡╣ */
170+
171+
/*--
172+
* U+2561 Box Drawings Vertical Single and Left Double,
173+
* U+2563 Box Drawings Double Vertical and Left
174+
*--
175+
*/
156176
{"\342\225\241", "\342\225\243"},
157177
},
158178
},
159179
{
160180
{
161-
/* */
181+
/* U+2502 Box Drawings Light Vertical */
162182
"\342\224\202",
163-
/* ┼╪ */
183+
184+
/*--
185+
* U+253C Box Drawings Light Vertical and Horizontal,
186+
* U+256A Box Drawings Vertical Single and Horizontal Double
187+
*--
188+
*/
164189
{"\342\224\274", "\342\225\252"},
165-
/* ┴╧ */
190+
191+
/*--
192+
* U+2534 Box Drawings Light Up and Horizontal,
193+
* U+2567 Box Drawings Up Single and Horizontal Double
194+
*--
195+
*/
166196
{"\342\224\264", "\342\225\247"},
167-
/* ┬╤ */
197+
198+
/*--
199+
* U+252C Box Drawings Light Down and Horizontal,
200+
* U+2564 Box Drawings Down Single and Horizontal Double
201+
*--
202+
*/
168203
{"\342\224\254", "\342\225\244"},
169204
},
170205
{
171-
/* */
206+
/* U+2551 Box Drawings Double Vertical */
172207
"\342\225\221",
173-
/* ╫╬ */
208+
209+
/*--
210+
* U+256B Box Drawings Vertical Double and Horizontal Single,
211+
* U+256C Box Drawings Double Vertical and Horizontal
212+
*--
213+
*/
174214
{"\342\225\253", "\342\225\254"},
175-
/* ╨╩ */
215+
216+
/*--
217+
* U+2568 Box Drawings Up Double and Horizontal Single,
218+
* U+2569 Box Drawings Double Up and Horizontal
219+
*--
220+
*/
176221
{"\342\225\250", "\342\225\251"},
177-
/* ╥╦ */
222+
223+
/*--
224+
* U+2565 Box Drawings Down Double and Horizontal Single,
225+
* U+2566 Box Drawings Double Down and Horizontal
226+
*--
227+
*/
178228
{"\342\225\245", "\342\225\246"},
179229
},
180230
},
181231
{
182-
/* └│┌─┐┘ */
232+
/*--
233+
* U+2514 Box Drawings Light Up and Right,
234+
* U+2502 Box Drawings Light Vertical,
235+
* U+250C Box Drawings Light Down and Right,
236+
* U+2500 Box Drawings Light Horizontal,
237+
* U+2510 Box Drawings Light Down and Left,
238+
* U+2518 Box Drawings Light Up and Left
239+
*--
240+
*/
183241
{"\342\224\224", "\342\224\202", "\342\224\214", "\342\224\200", "\342\224\220", "\342\224\230"},
184-
/* ╚║╔═╗╝ */
242+
243+
/*--
244+
* U+255A Box Drawings Double Up and Right,
245+
* U+2551 Box Drawings Double Vertical,
246+
* U+2554 Box Drawings Double Down and Right,
247+
* U+2550 Box Drawings Double Horizontal,
248+
* U+2557 Box Drawings Double Down and Left,
249+
* U+255D Box Drawings Double Up and Left
250+
*--
251+
*/
185252
{"\342\225\232", "\342\225\221", "\342\225\224", "\342\225\220", "\342\225\227", "\342\225\235"},
186253
},
187254
" ",
188-
"\342\206\265", /* ↵ */
255+
/* U+21B5 Downwards Arrow with Corner Leftwards */
256+
"\342\206\265",
189257
" ",
190-
"\342\206\265", /* ↵ */
191-
"\342\200\246", /* … */
192-
"\342\200\246", /* … */
258+
/* U+21B5 Downwards Arrow with Corner Leftwards */
259+
"\342\206\265",
260+
/* U+2026 Horizontal Ellipsis */
261+
"\342\200\246",
262+
"\342\200\246",
193263
true
194264
};
195265

0 commit comments

Comments
 (0)