feat(gbase8s): pick locale and charset when creating database

This commit is contained in:
弈秋 authored and GitHub committed 2026-09-16 21:37:34 +08:00
1 parent ea1de14517
commit 1d19c8b273
8 files changed
+190 -9

No files matched your search

@@ -10,6 +10,12 @@ export interface CreateDatabaseCharsetMetadata {
export const CREATE_DATABASE_CHARSET_OPTIONS = ["utf8mb4", "utf8", "gbk", "latin1", "ascii", "big5", "gb2312", "utf16", "utf32"] as const;
// Common GBase 8s / Informix database locales (language_territory.codeset). The default is a
// UTF-8 locale so newly created databases can store Chinese; en_US.819 is a typical Informix
// instance default and cannot hold CJK characters.
export const GBASE8S_DATABASE_LOCALES = ["zh_CN.utf8", "en_US.utf8", "ja_JP.utf8", "ko_KR.utf8", "zh_CN.gbk", "zh_CN.gb18030", "en_US.819"] as const;
export const DEFAULT_GBASE8S_DATABASE_LOCALE = "zh_CN.utf8";
const FALLBACK_COLLATION_OPTIONS: Record<string, string[]> = {
ascii: ["ascii_general_ci", "ascii_bin"],
big5: ["big5_chinese_ci", "big5_bin"],