diff options
| author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-04-20 09:49:44 +0300 |
|---|---|---|
| committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2011-04-20 09:59:46 +0300 |
| commit | 8a6d60fd0c01671773055558b687199ede961a97 (patch) | |
| tree | 4ec6ee415afd62debb0a6b93c6d3c755b09af714 /src | |
| parent | ebcbc8cfe6c2d9c587ae2a25e545f09b58b666b0 (diff) | |
Quotes in strings injected into bki file need to escaped. In particular,
"People's Republic of China" locale on Windows was causing initdb to fail.
This fixes bug #5818 reported by yulei. On master, this makes the mapping
of "People's Republic of China" to just "China" obsolete. In 9.0 and 8.4,
just fix the escaping. Earlier versions didn't have locale names in bki
file.
Diffstat (limited to 'src')
| -rw-r--r-- | src/bin/initdb/initdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 0aee70de1d6..7ca4c934318 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -1313,9 +1313,9 @@ bootstrap_template1(void) 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. |
