postgres/src/backend/utils/mb
Tom Lane c98c35cd08 Avoid putting build-location-dependent strings into generated files.
Various Perl scripts we use to generate files were in the habit of
printing things like "generated by $0" into their output files.
That looks like a fine idea at first glance, but it results in
non-reproducible output, because in VPATH builds $0 won't be just
the name of the script file, but a full path for it.  We'd prefer
that you get identical results whether using VPATH or not, so this
is a bad thing.

Some of these places also printed their input file name(s), causing
an additional hazard of the same type.

Hence, establish a policy that thou shalt not print $0, nor input file
pathnames, into output files (they're still allowed in error messages,
though).  Instead just write the script name verbatim.  While we are at
it, we can make these annotations more useful by giving the script's
full relative path name within the PG source tree, eg instead of
Gen_fmgrtab.pl let's print src/backend/utils/Gen_fmgrtab.pl.

Not all of the changes made here actually affect any files shipped
in finished tarballs today, but it seems best to apply the policy
everyplace so that nobody copies unsafe code into places where it
could matter.

Christoph Berg and Tom Lane

Discussion: https://postgr.es/m/20171215102223.GB31812@msg.df7cb.de
2017-12-21 10:57:06 -05:00
..
Unicode Avoid putting build-location-dependent strings into generated files. 2017-12-21 10:57:06 -05:00
conversion_procs Remove unnecessary parentheses in return statements 2017-09-05 14:52:55 -04:00
Makefile Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
README Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
conv.c Post-PG 10 beta1 pgindent run 2017-05-17 16:31:56 -04:00
encnames.c Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
iso.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
mbutils.c Don't call pgwin32_message_to_UTF16() without CurrentMemoryContext. 2017-11-12 13:03:15 -08:00
wchar.c Reduce excessive dereferencing of function pointers 2017-09-07 13:56:09 -04:00
win866.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
win1251.c Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
wstrcmp.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00
wstrncmp.c pgindent run for 9.4 2014-05-06 12:12:18 -04:00

README

src/backend/utils/mb/README

Encodings
=========

encnames.c:	public functions for both the backend and the frontend.
conv.c:		static functions and a public table for code conversion
wchar.c:	mostly static functions and a public table for mb string and
		multibyte conversion
mbutils.c:	public functions for the backend only.
		requires conv.c and wchar.c
wstrcmp.c:	strcmp for mb
wstrncmp.c:	strncmp for mb
win866.c:	a tool to generate KOI8 <--> CP866 conversion table
iso.c:		a tool to generate KOI8 <--> ISO8859-5 conversion table
win1251.c:	a tool to generate KOI8 <--> CP1251 conversion table

Introduction
------------
	http://www.cprogramming.com/tutorial/unicode.html