mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-27 07:21:09 +08:00
16e3ad5d14
Since %c only passes a C "char" to printf, it's incapable of dealing
with multibyte characters. Passing just the first byte of such a
character leads to an output string that is visibly not correctly
encoded, resulting in undesirable behavior such as encoding conversion
failures while sending error messages to clients.
We've lived with this issue for a long time because it was inconvenient
to avoid in a portable fashion. However, now that we always use our own
snprintf code, it's reasonable to use the %.*s format to print just one
possibly-multibyte character in a string. (We previously avoided that
obvious-looking answer in order to work around glibc's bug #6530, cf
commits
|
||
---|---|---|
.. | ||
data | ||
expected | ||
sql | ||
.gitignore | ||
hstore_compat.c | ||
hstore_gin.c | ||
hstore_gist.c | ||
hstore_io.c | ||
hstore_op.c | ||
hstore--1.0--1.1.sql | ||
hstore--1.1--1.2.sql | ||
hstore--1.2--1.3.sql | ||
hstore--1.3--1.4.sql | ||
hstore--1.4--1.5.sql | ||
hstore--1.4.sql | ||
hstore--1.5--1.6.sql | ||
hstore--1.6--1.7.sql | ||
hstore.control | ||
hstore.h | ||
Makefile |