Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitcd3e007

Browse files
committed
Allow unrecognized encoding names in locales, as long as they're the same.
The buildfarm says commit5827472 doesn'twork so well on Windows. This is because the encoding part of Windowslocale names can be just a code page number, eg "1252", which we don'tconsider to be a valid encoding name. Add a check to accept encodingparts that are case-insensitively string equal; this at least ensuresthat the new code doesn't reject any cases that the old code allowed.
1 parentdb98b31 commitcd3e007

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎contrib/pg_upgrade/check.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,14 @@ equivalent_locale(const char *loca, const char *locb)
437437
if (!chara|| !charb)
438438
return (pg_strcasecmp(loca,locb)==0);
439439

440-
/* Compare the encoding parts. */
441-
if (!equivalent_encoding(chara+1,charb+1))
440+
/*
441+
* Compare the encoding parts.Windows tends to use code page numbers for
442+
* the encoding part, which equivalent_encoding() won't like, so accept if
443+
* the strings are case-insensitive equal; otherwise use
444+
* equivalent_encoding() to compare.
445+
*/
446+
if (pg_strcasecmp(chara+1,charb+1)!=0&&
447+
!equivalent_encoding(chara+1,charb+1))
442448
return false;
443449

444450
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp