diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index fa14161551f..0febcf1fcfb 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -1355,9 +1355,9 @@ bootstrap_template1(char *short_version) bki_lines = replace_token(bki_lines, "ENCODING", encodingid); - bki_lines = replace_token(bki_lines, "LC_COLLATE", lc_collate); + bki_lines = replace_token(bki_lines, "LC_COLLATE", escape_quotes(lc_collate)); - bki_lines = replace_token(bki_lines, "LC_CTYPE", lc_ctype); + bki_lines = replace_token(bki_lines, "LC_CTYPE", escape_quotes(lc_ctype)); /* * Pass correct LC_xxx environment to bootstrap.