link that explain ICU_LOCALE locale concept about local variant code and keywords.

Started by jian heabout 4 years ago3 messagesgeneral
Jump to latest
#1jian he
jian.universality@gmail.com

code from
/messages/by-id/5e756dd6-0e91-d778-96fd-b1bcb06c161a@2ndquadrant.com

DROP DATABASE IF EXISTS dbicu;
CREATE DATABASE dbicu LOCALE_PROVIDER icu LOCALE 'en_US' ICU_LOCALE
'en-u-kf-upper' template 'template0';
\c dbicu
CREATE COLLATION upperfirst (provider = icu, locale = 'en-u-kf-upper');
CREATE TABLE icu(def text, en text COLLATE "en_US", upfirst text COLLATE
upperfirst);
INSERT INTO icu VALUES ('a', 'a', 'a'), ('b','b','b'), ('A','A','A'),
('B','B','B');
SELECT def AS def FROM icu ORDER BY def;
SELECT def AS en FROM icu ORDER BY en;
SELECT def AS upfirst FROM icu ORDER BY upfirst;
SELECT def AS upfirst_explicit FROM icu ORDER BY en COLLATE upperfirst;
SELECT def AS en_x_explicit FROM icu ORDER BY def COLLATE "en-x-icu";

- trying to replicate the above quoted command.
- So I don't know * ICU_LOCALE 'en-u-kf-upper' *the *u *and the *kf *refer
to?
Even I followed
https://unicode-org.github.io/icu/userguide/locale/#the-locale-concept

1. Language code
2. Script code
3. Country code
4. Variant code
5. Keywords

So which website can I get the info about the "kf" and "u".

--
I recommend David Deutsch's <<The Beginning of Infinity>>

Jian

#2jian he
jian.universality@gmail.com
In reply to: jian he (#1)
Re: link that explain ICU_LOCALE locale concept about local variant code and keywords.

I found answer on https://www.unicode.org/reports/tr35/tr35-collation.html
and https://cldr.unicode.org/index/bcp47-extension

On Wed, May 25, 2022 at 1:52 PM jian he <jian.universality@gmail.com> wrote:

code from
/messages/by-id/5e756dd6-0e91-d778-96fd-b1bcb06c161a@2ndquadrant.com

DROP DATABASE IF EXISTS dbicu;
CREATE DATABASE dbicu LOCALE_PROVIDER icu LOCALE 'en_US' ICU_LOCALE
'en-u-kf-upper' template 'template0';
\c dbicu
CREATE COLLATION upperfirst (provider = icu, locale = 'en-u-kf-upper');
CREATE TABLE icu(def text, en text COLLATE "en_US", upfirst text COLLATE
upperfirst);
INSERT INTO icu VALUES ('a', 'a', 'a'), ('b','b','b'), ('A','A','A'),
('B','B','B');
SELECT def AS def FROM icu ORDER BY def;
SELECT def AS en FROM icu ORDER BY en;
SELECT def AS upfirst FROM icu ORDER BY upfirst;
SELECT def AS upfirst_explicit FROM icu ORDER BY en COLLATE upperfirst;
SELECT def AS en_x_explicit FROM icu ORDER BY def COLLATE "en-x-icu";

- trying to replicate the above quoted command.
- So I don't know * ICU_LOCALE 'en-u-kf-upper' *the *u *and the *kf *refer
to?

Even I followed
https://unicode-org.github.io/icu/userguide/locale/#the-locale-concept

1. Language code
2. Script code
3. Country code
4. Variant code
5. Keywords

So which website can I get the info about the "kf" and "u".

--
I recommend David Deutsch's <<The Beginning of Infinity>>

Jian

--
I recommend David Deutsch's <<The Beginning of Infinity>>

Jian

#3Daniel Verite
daniel@manitou-mail.org
In reply to: jian he (#1)
Re: link that explain ICU_LOCALE locale concept about local variant code and keywords.

jian he wrote:

So which website can I get the info about the "kf" and "u".

https://unicode.org/reports/tr35/#u_Extension

https://www.unicode.org/reports/tr35/tr35-collation.html#Collation_Settings

Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite