NLS: koi8-u support
Please add support of KOI-8 Ukrainian (AKA koi8-u) encoding into kernel, because
ukrainian users can't read files with ukrainian names from NTFS and SMB disks without it.
Patch for 2.4.x kernels (2.4.0-test10 - 2.4.3):
==========cut from here================
diff -urN linux-vanilla/Documentation/Configure.help linux/Documentation/Configure.help
--- linux-vanilla/Documentation/Configure.help Thu Jan 4 23:00:55
2001
+++ linux/Documentation/Configure.help Thu Jan 11 14:43:12 2001
@@ -11762,7 +11762,7 @@
cp862, cp863, cp864, cp865, cp866, cp869, cp874, cp932, cp936, cp949, cp950, euc-jp, euc-kr, gb2312, iso8859-1, iso8859-2, iso8859-3, iso8859-4, iso8859-5, iso8859-6, iso8859-7, iso8859-8, iso8859-9,
- iso8859-14, iso8859-15, koi8-r, sjis
+ iso8859-14, iso8859-15, koi8-r, koi8-u, sjis
If you specify a wrong value, it will use the built-in NLS; compatible with iso8859-1.
@@ -12034,7 +12034,7 @@
input/output character sets. Say Y here for ISO8859-5, a Cyrillic character set with which you can type Bulgarian, Byelorussian, Macedonian, Russian, Serbian, and Ukrainian. Note that the charset
- KOI8-R is preferred in Russia.
+ KOI8-R is preferred in Russia and KOI8-U is preferred in Ukraine.
nls iso8859-6
CONFIG_NLS_ISO8859_6
@@ -12110,6 +12110,14 @@
from the Microsoft FAT file system family or from JOLIET CDROMs correctly on the screen, you need to include the appropriate input/output character sets. Say Y here for the preferred Russian
+ character set.
+
+nls koi8-u
+CONFIG_NLS_KOI8_U
+ If you want to display filenames with native language characters + from the Microsoft FAT file system family or from JOLIET CDROMs + correctly on the screen, you need to include the appropriate + input/output character sets. Say Y here for the preferred Ukrainian
character set.
Virtual terminal
arch/alpha/defconfig +1 -0
@@ -604,6 +604,7 @@ # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set #
diff -urN linux-vanilla/arch/arm/def-configs/a5k
linux/arch/arm/def-configs/a5k
arch/arm/def-configs/a5k +1 -0
@@ -484,6 +484,7 @@ # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set #
diff -urN linux-vanilla/arch/arm/def-configs/assabet linux/arch/arm/def-configs/assabet
--- linux-vanilla/arch/arm/def-configs/assabet Tue Nov 28 03:07:59
2000
+++ linux/arch/arm/def-configs/assabet Thu Jan 11 14:47:31 2001
@@ -502,6 +502,7 @@
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
diff -urN linux-vanilla/arch/arm/def-configs/footbridge linux/arch/arm/def-configs/footbridge
--- linux-vanilla/arch/arm/def-configs/footbridge Tue Nov 28
03:07:59 2000
+++ linux/arch/arm/def-configs/footbridge Thu Jan 11 14:46:51 2001
@@ -727,6 +727,7 @@
# CONFIG_NLS_ISO8859_14 is not set CONFIG_NLS_ISO8859_15=m
# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
diff -urN linux-vanilla/arch/arm/def-configs/graphicsclient linux/arch/arm/def-configs/graphicsclient
--- linux-vanilla/arch/arm/def-configs/graphicsclient Tue Nov 28
03:07:59 2000
+++ linux/arch/arm/def-configs/graphicsclient Thu Jan 11 14:47:38
2001
@@ -494,6 +494,7 @@
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
diff -urN linux-vanilla/arch/arm/def-configs/neponset linux/arch/arm/def-configs/neponset
--- linux-vanilla/arch/arm/def-configs/neponset Tue Nov 28 03:07:59
2000
+++ linux/arch/arm/def-configs/neponset Thu Jan 11 14:47:51 2001
@@ -510,6 +510,7 @@
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
diff -urN linux-vanilla/arch/arm/def-configs/rpc
linux/arch/arm/def-configs/rpc
arch/arm/def-configs/rpc +1 -0
@@ -600,6 +600,7 @@ # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set CONFIG_NLS_KOI8_R=m +CONFIG_NLS_KOI8_U=m # CONFIG_NLS_UTF8 is not set #
diff -urN linux-vanilla/arch/arm/def-configs/shark linux/arch/arm/def-configs/shark
--- linux-vanilla/arch/arm/def-configs/shark Tue Sep 19 01:15:24
2000
+++ linux/arch/arm/def-configs/shark Thu Jan 11 14:47:45 2001
@@ -559,6 +559,7 @@
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
diff -urN linux-vanilla/arch/arm/def-configs/sherman linux/arch/arm/def-configs/sherman
--- linux-vanilla/arch/arm/def-configs/sherman Tue Nov 28 03:07:59
2000
+++ linux/arch/arm/def-configs/sherman Thu Jan 11 14:47:58 2001
@@ -198,6 +198,7 @@
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
#
# Kernel hacking
diff -urN linux-vanilla/arch/arm/def-configs/victor linux/arch/arm/def-configs/victor
--- linux-vanilla/arch/arm/def-configs/victor Tue Jun 20 03:59:33
2000
+++ linux/arch/arm/def-configs/victor Thu Jan 11 14:47:21 2001
@@ -191,6 +191,7 @@
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
#
# Kernel hacking
arch/arm/defconfig +1 -0
@@ -710,6 +710,7 @@ # CONFIG_NLS_ISO8859_14 is not set CONFIG_NLS_ISO8859_15=m # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # # Kernel hacking
arch/m68k/defconfig +1 -0
@@ -291,6 +291,7 @@ # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # # Console drivers
diff -urN linux-vanilla/arch/mips/defconfig-cobalt linux/arch/mips/defconfig-cobalt
--- linux-vanilla/arch/mips/defconfig-cobalt Fri Jul 28 04:36:54
2000
+++ linux/arch/mips/defconfig-cobalt Thu Jan 11 14:48:48 2001
@@ -558,6 +558,7 @@
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set CONFIG_NLS_KOI8_R=m
+CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m
#
diff -urN linux-vanilla/arch/ppc/configs/apus_defconfig linux/arch/ppc/configs/apus_defconfig
--- linux-vanilla/arch/ppc/configs/apus_defconfig Sun Nov 12
04:14:38 2000
+++ linux/arch/ppc/configs/apus_defconfig Thu Jan 11 14:48:33 2001
@@ -553,6 +553,7 @@
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
diff -urN linux-vanilla/arch/ppc/configs/common_defconfig linux/arch/ppc/configs/common_defconfig
--- linux-vanilla/arch/ppc/configs/common_defconfig Sun Nov 12
04:14:38 2000
+++ linux/arch/ppc/configs/common_defconfig Thu Jan 11 14:48:41 2001
@@ -690,6 +690,7 @@
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
#
arch/ppc/defconfig +1 -0
@@ -690,6 +690,7 @@ # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set #
arch/sparc/defconfig +1 -0
@@ -358,6 +358,7 @@ # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set #
arch/sparc64/defconfig +1 -0
@@ -519,6 +519,7 @@ # CONFIG_NLS_ISO8859_14 is not set # CONFIG_NLS_ISO8859_15 is not set # CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set # CONFIG_NLS_UTF8 is not set #
fs/nls/Config.in +0 -0
@@ -54,6 +54,7 @@ tristate 'NLS ISO 8859-14 (Latin 8; Celtic)' CONFIG_NLS_ISO8859_14 tristate 'NLS ISO 8859-15 (Latin 9; Western European Languages with
Euro)' CONFIG_NLS_ISO8859_15
tristate 'NLS KOI8-R (Russian)' CONFIG_NLS_KOI8_R + tristate 'NLS KOI8-U (Ukrainian)' CONFIG_NLS_KOI8_U tristate 'NLS UTF8' CONFIG_NLS_UTF8
endmenu
fi
fs/nls/Makefile +1 -0
@@ -49,6 +49,7 @@ obj-$(CONFIG_NLS_ISO8859_14) += nls_iso8859-14.o obj-$(CONFIG_NLS_ISO8859_15) += nls_iso8859-15.o obj-$(CONFIG_NLS_KOI8_R) += nls_koi8-r.o +obj-$(CONFIG_NLS_KOI8_U) += nls_koi8-u.o obj-$(CONFIG_NLS_ABC) += nls_abc.o obj-$(CONFIG_NLS_UTF8) += nls_utf8.o
fs/nls/nls_koi8-u.c +294 -0
294 lines not on this page · raw message
*uni)
+{
+ *uni = charset2uni[*rawstring];
+ if (*uni == 0x0000)
+ return -EINVAL;
+ return 1;
+}
+
+static struct nls_table table = {
+ "koi8-u",
+ uni2char,
+ char2uni,
+ charset2lower,
+ charset2upper,
+ THIS_MODULE,
+};
+
+static int __init init_nls_koi8_u(void)
+{
+ return register_nls(&table);
+}
+
+static void __exit exit_nls_koi8_u(void)
+{
+ unregister_nls(&table);
+}
+
+module_init(init_nls_koi8_u)
+module_exit(exit_nls_koi8_u)
+
+/*
+ * Overrides for Emacs so that we follow Linus's tabbing style.
+ * Emacs will notice this stuff at the end of the file and automatically
+ * adjust the settings for this buffer only. This must remain at the end
+ * of the file.
+ * ---------------------------------------------------------------------------
+ * Local variables:
+ * c-indent-level: 8
+ * c-brace-imaginary-offset: 0
+ * c-brace-offset: -8
+ * c-argdecl-indent: 8
+ * c-label-offset: -8
+ * c-continued-statement-offset: 8
+ * c-continued-brace-offset: 0
+ * End:
+ */
==========cut to here================
Signature · 2 lines
Best regards, mailto:[email protected] Volodymyr M. Lisivka ICQ#14549856
Quoted 4 lines · On 2001.04.06 22:21:35 +0300 [email protected] wrote:
Hello!
It was added already. But charset name is koi8-ru for some strange reason
Sound good.
koi8-ru extends koi8-u(RFC-2319) only by one Byelorussian letter. But standartization of koi8-ru is not finished at this moment and these encodings have different codes for some special symbols (AFAIK). (See details on http://www.cad.ntu-kpi.kiev.ua/multiling/
and http://www.net.ua/KOI8-U/ )
Maybe it would be better to separate supporting of koi8-u and koi8-ru in kernel
to avoid problems in future?
Quoted 11 lines
Bye,
OlegQuoted 1 line · In article <[email protected]> you wrote:
Please add support of KOI-8 Ukrainian (AKA koi8-u) encoding into
kernel,
Quoted 6 lines
because
ukrainian users can't read files with ukrainian names from NTFS and SMB disks without it.Patch for 2.4.x kernels (2.4.0-test10 - 2.4.3):
==========cut from here================
Signature · 2 lines
Best regards, mailto:[email protected] Volodymyr M. Lisivka ICQ#14549856