source: introduction/important/locale-issues.xml@ 57b11363

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 6.2 6.2.0 6.2.0-rc1 6.2.0-rc2 6.3 6.3-rc1 6.3-rc2 6.3-rc3 7.10 7.4 7.5 7.6 7.6-blfs 7.6-systemd 7.7 7.8 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind gnome kde5-13430 kde5-14269 kde5-14686 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts krejzi/svn lazarus lxqt nosym perl-modules plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition systemd-11177 systemd-13485 trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 57b11363 was 57b11363, checked in by Randy McMurchy <randy@…>, 18 years ago

Added the 'User Notes' wiki link to each package page; changed all instances of .[so,a] to .{so,a} (brackets changed to braces); changed all replaceable tags to use angle brackets instead of square brackets to encapsulate the text - commit #12

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@5840 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 6.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
3 "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="locale-issues" xreflabel="Locale Related Issues">
9 <?dbhtml filename="locale-issues.html"?>
10
11 <sect1info>
12 <othername>$LastChangedBy$</othername>
13 <date>$Date$</date>
14 </sect1info>
15
16 <title>Locale Related Issues</title>
17
18 <para>This page contains information about locale related problems and
19 issues. In this paragraph you'll find a generic overview of things that can
20 come up when configuring your system for various locales. The previous
21 sentence and the remainder of this paragraph must still be
22 revised/completed.</para>
23
24 <sect2>
25
26 <title>Package Specific Locale Issues</title>
27
28 <para>For package-specific issues, find the concerned package from the list
29 below and follow the link to view the available information. If a package
30 is not listed here, it does not mean there are no known locale-specific
31 issues or problems with that package. It only means that this page has not
32 been updated with the locale-specific information regarding that package.
33 Please reference the BLFS Wiki page for a particular package for any
34 additional locale-specific information. </para>
35
36 <itemizedlist>
37
38 <title>List of Packages with Locale Related Issues</title>
39
40 <listitem>
41 <para><xref linkend="locale-mc"/></para>
42 </listitem>
43 <listitem>
44 <para><xref linkend="locale-unzip"/></para>
45 </listitem>
46
47 </itemizedlist>
48
49 <sect3 id="locale-mc" xreflabel="MC-&mc-version;">
50
51 <title><xref linkend="mc"/></title>
52
53 <para>This package makes the assumption that <quote>characters</quote>
54 and <quote>bytes</quote> are the same thing. This is not true in UTF-8
55 based locales. Due to this assumption <application>MC</application> will
56 incorrectly position characters on the screen. After the cursor is moved
57 a bit the screen becomes totally unreadable, as illustrated on
58 <ulink url="&files-anduin;/mc-bad.png">this
59 screenshot</ulink> (taken in a ru_RU.UTF-8 locale). Additionally, input
60 of non-ASCII characters in the editor is impossible, even after selecting
61 <quote>Other 8-bit</quote> encoding from the menu.</para>
62
63 </sect3>
64
65 <sect3 id="locale-unzip" xreflabel="UnZip-&unzip-version;">
66
67 <title><xref linkend="unzip"/></title>
68
69 <note>
70 <para>Use of <application>UnZip</application> in the
71 <application>JDK</application>, <application>Mozilla</application>,
72 <application>DocBook</application> or any other BLFS package
73 installation is not a problem, as BLFS instructions never use
74 <application>UnZip</application> to extract a file with non-ASCII
75 characters in the file's name.</para>
76 </note>
77
78 <para>The <application>UnZip</application> package assumes that filenames
79 stored in the ZIP archives created on non-Unix systems are encoded in
80 CP850, and that they should be converted to ISO-8859-1 when writing files
81 onto the filesystem. Such assumptions are not always valid. In fact,
82 inside the ZIP archive, filenames are encoded in the DOS codepage that is
83 in use in the relevant country, and the filenames on disk should be in
84 the locale encoding. In MS Windows, the OemToChar() C function (from
85 <filename>User32.DLL</filename>) does the correct conversion (which is
86 indeed the conversion from CP850 to a superset of ISO-8859-1 if MS
87 Windows is set up to use the US English language), but there is no
88 equivalent in Linux.</para>
89
90 <para>When using <command>unzip</command> to unpack a ZIP archive
91 containing non-ASCII filenames, the filenames are damaged because
92 <command>unzip</command> uses improper conversion when any of its
93 encoding assumptions are incorrect. For example, in the ru_RU.KOI8-R
94 locale, conversion of filenames from CP866 to KOI8-R is required, but
95 conversion from CP850 to ISO-8859-1 is done, which produces filenames
96 consisting of undecipherable characters instead of words (the closest
97 equivalent understandable example for English-only users is rot13). There
98 are several ways around this limitation:</para>
99
100 <para>1) For unpacking ZIP archives with filenames containing non-ASCII
101 characters, use <ulink url="http://www.winzip.com/">WinZip</ulink> while
102 running the <ulink url="http://www.winehq.com/">Wine</ulink> Windows
103 emulator.</para>
104
105 <para>2) After running <command>unzip</command>, fix the damage made to
106 the filenames using the <command>convmv</command> tool
107 (<ulink url="http://j3e.de/linux/convmv/"/>). The following is an example
108 for the ru_RU.KOI8-R locale:</para>
109
110 <blockquote>
111 <para>Step 1. Undo the conversion done by
112 <command>unzip</command>:</para>
113
114<screen><userinput>convmv -f iso-8859-1 -t cp850 -r --nosmart --notest \
115 <replaceable>&lt;/path/to/unzipped/files&gt;</replaceable></userinput></screen>
116
117 <para>Step 2. Do the correct conversion instead:</para>
118
119<screen><userinput>convmv -f cp866 -t koi8-r -r --nosmart --notest \
120 <replaceable>&lt;/path/to/unzipped/files&gt;</replaceable></userinput></screen>
121 </blockquote>
122
123 <para>3) Apply this patch to unzip:
124 <ulink url="https://bugzilla.altlinux.ru/attachment.cgi?id=532"/></para>
125
126 <para>It allows to specify the assumed filename encoding in the ZIP
127 archive using the <option>-O charset_name</option> option and the
128 on-disk filename encoding using the <option>-I charset_name</option>
129 option. Defaults: the on-disk filename encoding is the locale encoding,
130 the encoding inside the ZIP archive is guessed according to the builtin
131 table based on the locale encoding. For US English users, this still
132 means that unzip converts from CP850 to ISO-8859-1 by default.</para>
133
134 <para>Caveat: this method works only with 8-bit locale encodings, not
135 with UTF-8. Attempting to use a patched <command>unzip</command> in UTF-8
136 locales may result in a segmentation fault and is probably a security
137 risk.</para>
138
139 </sect3>
140
141 </sect2>
142
143</sect1>
Note: See TracBrowser for help on using the repository browser.