mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-22 06:17:00 +08:00
Attached to the mail is locale-patch.tar.gz. In the archive there are: file README.locale short description directory src/test/locale test suite; currently only koi8-r tests, but the suite can be easily extended file locale.patch the very patch; to apply: patch < locale.patch; should be applied to postgres-6.3.2 (at least I created it with 6.3.2 without any additional patches) Files touched by the patch: src/include/utils/builtins.h src/backend/utils/adt/char.c src/backend/utils/adt/varchar.c src/backend/utils/adt/varlena.c Oleg
19 lines
373 B
Python
Executable File
19 lines
373 B
Python
Executable File
#! /usr/local/bin/python
|
|
|
|
import sys, string, locale
|
|
locale.setlocale(locale.LC_ALL, "")
|
|
|
|
if len(sys.argv) <> 2:
|
|
sys.stderr.write("Usage: sort.py filename\n")
|
|
sys.exit(1)
|
|
|
|
infile = open(sys.argv[1], 'r')
|
|
list = infile.readlines()
|
|
infile.close()
|
|
|
|
for i in range(0, len(list)):
|
|
list[i] = list[i][:-1] # chop!
|
|
|
|
list.sort(locale.strcoll)
|
|
print string.join(list, '\n')
|