| From: | "Peter J(dot) Holzer" <hjp-pgsql(at)hjp(dot)at> |
|---|---|
| To: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: List of encodings |
| Date: | 2026-04-20 05:53:52 |
| Message-ID: | nczevu7hf7mmdcetcvzymtl5ttlcltba3vuwm36ubi3fmyrdir@ldi6iai6jzen |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 2026-04-19 20:13:29 -0500, Igor Korot wrote:
> So, let's say I chose "BIG5"".
>
> As stated the table contains:
>
> big5_to_utf8 | BIG5 | t
> big5_to_euc_tw | BIG5 | t
> big5_to_mic | BIG5 | t
>
> Since all 3 are default character sets, which one would be chosen?
> (in the context of CREATE DATABASE)
Note that the table contains *two* encodings (conforencoding and
contoencoding) for each conversion. If you look at both it becomes
clear:
hjp=> select conname,
pg_encoding_to_char(conforencoding) as for_enc,
pg_encoding_to_char(contoencoding) to_enc,
condefault
from pg_conversion
where conname like 'big5%';
╔════════════════╤═════════╤═══════════════╤════════════╗
║ conname │ for_enc │ to_enc │ condefault ║
╟────────────────┼─────────┼───────────────┼────────────╢
║ big5_to_euc_tw │ BIG5 │ EUC_TW │ t ║
║ big5_to_mic │ BIG5 │ MULE_INTERNAL │ t ║
║ big5_to_utf8 │ BIG5 │ UTF8 │ t ║
╚════════════════╧═════════╧═══════════════╧════════════╝
(3 rows)
If you need to convert from BIG5 to UTF8, big5_to_utf8 is the default
(and indeed only) conversion. If you need to convert from BIG5 to
EUC_TW, it's big5_to_euc_tw, etc.
hjp
--
_ | Peter J. Holzer | Story must make more sense than reality.
|_|_) | |
| | | hjp(at)hjp(dot)at | -- Charles Stross, "Creative writing
__/ | http://www.hjp.at/ | challenge!"
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Dominique Devienne | 2026-04-20 09:44:46 | Test cluster with high OIDs above the signed-int limit (2B+) |
| Previous Message | Tom Lane | 2026-04-20 01:49:30 | Re: List of encodings |