Fix some grammatical errors.

This commit is contained in:
Jim Mock 2000-03-11 01:46:38 +00:00
parent ed5dc939ef
commit 2f4179b7da
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=6725
2 changed files with 600 additions and 658 deletions

View file

@ -75,10 +75,10 @@
convention.</para> convention.</para>
<para>Localization settings are based on three main terms: <para>Localization settings are based on three main terms:
Language Code, Country Code and Encoding. Locale name constructed Language Code, Country Code, and Encoding. Locale names are
with this three parts as follows:</para> constructed from these parts as follows:</para>
<programlisting> <programlisting>
<replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting> <replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
<sect2> <sect2>
@ -125,19 +125,16 @@
<sect2> <sect2>
<title>Encodings</title> <title>Encodings</title>
<para>Some languages use non-ASCII encodings <para>Some languages use non-ASCII encodings that are 8-bit or
that are 8-bit or 16-bit wide characters. 16-bit wide characters. Older applications do not recognize them
Older applications do not recognize and mistake them for control characters. Newer applications
them and mistake them for control characters. Newer applications usually do recognize 8-bit characters. Depending on the
usually implementation, users may be required to compile an application
do recognize 8-bit characters. Depending on implementation, users with 16-bit support, or configure it correctly. To be able to
may be required to compile an application with 16-bit support, input and process 16-bit wide characters, the <ulink
or configure it correctly. url="../ports/">FreeBSD Ports collection</ulink> has provided
To be able to input and process each language with different programs. Refer to the i18n
16-bit wide characters, the <ulink url="../ports/">FreeBSD Ports documentation in the respective FreeBSD Port.</para>
collection</ulink> has provided each language with different
programs. Refer to the i18n documentation in the respective
FreeBSD Port.</para>
<para>Specifically, the user needs to look at the application <para>Specifically, the user needs to look at the application
documentation to decide on how to configure it correctly or to documentation to decide on how to configure it correctly or to
@ -147,19 +144,18 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>Language specific 8-bit wide character sets, f.e. <para>Language specific 8-bit wide character sets, i.e.,
ISO_8859-1, KOI8-R, CP437.</para> ISO_8859-1, KOI8-R, CP437.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>16-bit wide encodings, f.e. EUC, Big5.</para> <para>16-bit wide encodings, f.e. EUC, Big5.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<para>You can check active list of character sets at <para>You can check the active list of character sets at the
<ulink <ulink
url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</ulink>.</para> url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</ulink>.</para>
</sect2> </sect2>
<sect2> <sect2>
@ -169,24 +165,20 @@ url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</
have been named with <literal>i18n</literal> in their names for have been named with <literal>i18n</literal> in their names for
easy identification. However, they do not always support the easy identification. However, they do not always support the
language needed.</para> language needed.</para>
</sect2> </sect2>
<sect2 id="setting-locale"> <sect2 id="setting-locale">
<title>Setting Locale</title> <title>Setting Locale</title>
<para>Theoretically, one only needs to export the value of his/her <para>Theoretically, one only needs to export the value of his/her
locale name as <envar>LANG</envar> locale name as <envar>LANG</envar> in the login shell and is
in the login shell and is usually done usually done through the user's
through the user's <filename>~/.login_conf</filename> or <filename>~/.login_conf</filename> or the user login shell
the user login shell configuration configuration (<filename>~/.profile</filename>,
(<filename>~/.profile</filename>, <filename>~/.bashrc</filename>, <filename>~/.bashrc</filename>, <filename>~/.cshrc</filename>).
<filename>~/.cshrc</filename>). This should set all of the locale subsets (such as
This should set all of the locale <envar>LC_CTYPE</envar>, <envar>LC_CTIME</envar>, etc.). Please
subsets (such as <envar>LC_CTYPE</envar>, refer to language-specific FreeBSD documentation for more
<envar>LC_CTIME</envar>, etc.).
Please refer to
language-specific FreeBSD documentation for more
information.</para> information.</para>
<para>You should set the following two values in your configuration <para>You should set the following two values in your configuration
@ -211,365 +203,348 @@ url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</
<title>Setting Locale Methods</title> <title>Setting Locale Methods</title>
<para>There are two methods for setting locale, and both are <para>There are two methods for setting locale, and both are
described below. The first (recommended one) is by described below. The first (recommended one) is by assigning
setting environment variables assignment in the environment variables in <link linkend="login-class">login
<link linkend="login-class">login class</link>, class</link>, and the second is by adding the environment
and the second is by adding environment variables assignment variable assignments to the system's shell <link
to the system's shell linkend="startup-file">startup file</link>.</para>
<link linkend="startup-file">startup file</link>.</para>
<sect4 id="login-class"> <sect4 id="login-class">
<title>Login Classes Method</title> <title>Login Classes Method</title>
<para>This method allows to assing environment <para>This method allows environment variables needed for locale
variables needed for locale name and MIME character set once name and MIME character sets to be assigned once for every
for every possible shell instead of adding specific shell assignment possible shell instead of adding specific shell assignments to
to each shell startup file. each shell's startup file. <link linkend="usr-setup">User
<link linkend="usr-setup">User Level Setup</link> Level Setup</link> can be done by an user himself and <link
can be done by an user himself and linkend="adm-setup">Administrator Level Setup</link> require
<link linkend="adm-setup">Administrator Level Setup</link> require superuser priviledges.</para>
superuser priviledges.</para>
<sect5 id="usr-setup"> <sect5 id="usr-setup">
<title>User Level Setup</title> <title>User Level Setup</title>
<para>Here is minimal example of <filename>~/.login_conf</filename> <para>Here is a minimal example of a
file in user's home directory which have both variables set <filename>.login_conf</filename> file in user's home
for Russian KOI8-R encoding:</para> directory which has both variables set for Russian KOI8-R
encoding:</para>
<programlisting> <programlisting>
me:My Account:\ me:My Account:\
:charset=KOI8-R:\ :charset=KOI8-R:\
:lang=ru_RU.KOI8-R:</programlisting> :lang=ru_RU.KOI8-R:</programlisting>
<para>See <para>See <link linkend="adm-setup">Administrator Level
<link linkend="adm-setup">Administrator Level Setup</link> Setup</link> and &man.login.conf.5; for more details.</para>
and </sect5>
&man.login.conf.5; for explanation.</para>
</sect5> <sect5 id="adm-setup">
<title>Administrator Level Setup</title>
<sect5 id="adm-setup"> <para>Check that <filename>/etc/login.conf</filename> have the
<title>Administrator Level Setup</title> correct language user's class. Make sure these settings
appear in <filename>/etc/login.conf</filename>:</para>
<para>Check that <filename>/etc/login.conf</filename> have the <programlisting>
correct language user's class. Make sure these settings appear
in <filename>/etc/login.conf</filename>:</para>
<programlisting>
<replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\ <replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
:charset=<replaceable>MIME_charset</replaceable>:\ :charset=<replaceable>MIME_charset</replaceable>:\
:lang=<replaceable>locale_name</replaceable>:\ :lang=<replaceable>locale_name</replaceable>:\
:tc=default:</programlisting> :tc=default:</programlisting>
<para>So sticking with our previous example using Russian, it <para>So sticking with our previous example using Russian, it
would look like this:</para> would look like this:</para>
<programlisting> <programlisting>
russian:Russian Users Accounts:\ russian:Russian Users Accounts:\
:charset=KOI8-R:\ :charset=KOI8-R:\
:lang=ru_RU.KOI8-R:\ :lang=ru_RU.KOI8-R:\
:tc=default:</programlisting> :tc=default:</programlisting>
<para>Changing Login Classes with &man.vipw.8;:</para> <para>Changing Login Classes with &man.vipw.8;</para>
<para>Use <command>vipw</command> to add new users, and make the <para>Use <command>vipw</command> to add new users, and make
entry look like this:</para> the entry look like this:</para>
<programlisting> <programlisting>
user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting> user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting>
<para>Changing Login Classes with &man.adduser.8;:</para> <para>Changing Login Classes with &man.adduser.8;</para>
<para>Use <command>adduser</command> to add new users, and do <para>Use <command>adduser</command> to add new users, and do
the following:</para> the following:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>Set <programlisting>defaultclass = <replaceable>language</replaceable></programlisting> <para>Set <literal>defaultclass =
in <filename>/etc/adduser.conf</filename>. Keep in mind <replaceable>language</replaceable></literal> in
you must enter <literal>default</literal> class for all <filename>/etc/adduser.conf</filename>. Keep in mind
users of other languages in this case.</para> you must enter a <literal>default</literal> class for
</listitem> all users of other languages in this case.</para>
</listitem>
<listitem> <listitem>
<para>An alternative variant is answering the specified <para>An alternative variant is answering the specified
language each time that <screen><prompt>Enter login language each time that <screen><prompt>Enter login
class:</prompt> default []:</screen> appears from class:</prompt> default []:</screen> appears from
&man.adduser.8;</para> &man.adduser.8;</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Another alternative is to use the following for each <para>Another alternative is to use the following for each
user of a different language that you wish to add:</para> user of a different language that you wish to
add:</para>
<screen>&prompt.root; <userinput>adduser -class <replaceable>language</replaceable></userinput></screen> <screen>&prompt.root; <userinput>adduser -class <replaceable>language</replaceable></userinput></screen>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<para>Changing Login Classes with &man.pw.8;:</para> <para>Changing Login Classes with &man.pw.8;</para>
<para>If you use &man.pw.8; for adding new users, call it in <para>If you use &man.pw.8; for adding new users, call it in
this form:</para> this form:</para>
<screen>&prompt.root; <userinput>pw useradd <replaceable>user_name</replaceable> -L <replaceable>language</replaceable></userinput></screen> <screen>&prompt.root; <userinput>pw useradd <replaceable>user_name</replaceable> -L <replaceable>language</replaceable></userinput></screen>
</sect5> </sect5>
</sect4> </sect4>
<sect4 id="startup-file"> <sect4 id="startup-file">
<title>Shell Startup File Method</title> <title>Shell Startup File Method</title>
<note> <note>
<para>This method is not recommended because require <para>This method is not recommended because it requires a
different setup for each possible login program choosed. different setup for each possible login program chosen. Use
Use <link linkend="login-class">Login Class Method</link> the <link linkend="login-class">Login Class Method</link>
instead.</para> instead.</para>
</note> </note>
<para>To add locale name and MIME character set <para>To add the locale name and MIME character set, just set
just set the two environment variables shown below in the two environment variables shown below in the
the <filename>/etc/profile</filename> and/or <filename>/etc/profile</filename> and/or
<filename>/etc/csh.login</filename> shell startup files. We <filename>/etc/csh.login</filename> shell startup files. We
will use the Russian language as an example below:</para> will use the Russian language as an example below:</para>
<para>In <filename>/etc/profile</filename>:</para> <para>In <filename>/etc/profile</filename>:</para>
<programlisting> <programlisting>
<envar>LANG=ru_RU.KOI8-R; export LANG</envar> <envar>LANG=ru_RU.KOI8-R; export LANG</envar>
<envar>MM_CHARSET=KOI8-R; export MM_CHARSET</envar></programlisting> <envar>MM_CHARSET=KOI8-R; export MM_CHARSET</envar></programlisting>
<para>Or in <filename>/etc/csh.login</filename>:</para> <para>Or in <filename>/etc/csh.login</filename>:</para>
<programlisting> <programlisting>
<envar>setenv LANG ru_RU.KOI8-R</envar> <envar>setenv LANG ru_RU.KOI8-R</envar>
<envar>setenv MM_CHARSET KOI8-R</envar></programlisting> <envar>setenv MM_CHARSET KOI8-R</envar></programlisting>
<para>Alternatively, you can add the above instructions to <para>Alternatively, you can add the above instructions to
<filename>/usr/share/skel/dot.profile</filename> (similar to <filename>/usr/share/skel/dot.profile</filename> (similar to
what was used in <filename>/etc/profile</filename> above), or what was used in <filename>/etc/profile</filename> above), or
<filename>/usr/share/skel/dot.login</filename> (similar to what <filename>/usr/share/skel/dot.login</filename> (similar to
was used in <filename>/etc/csh.login</filename> above).</para> what was used in <filename>/etc/csh.login</filename>
above).</para>
<para>For X11:</para> <para>For X11:</para>
<para>In <filename>$HOME/.xinitrc</filename>:</para> <para>In <filename>$HOME/.xinitrc</filename>:</para>
<programlisting> <programlisting>
<envar>LANG=ru_RU.KOI8-R; export LANG</envar></programlisting> <envar>LANG=ru_RU.KOI8-R; export LANG</envar></programlisting>
<para>Or:</para> <para>Or:</para>
<programlisting> <programlisting>
<envar>setenv LANG ru_RU.KOI8-R</envar></programlisting> <envar>setenv LANG ru_RU.KOI8-R</envar></programlisting>
<para>Depending on your shell (see above).</para> <para>Depending on your shell (see above).</para>
</sect4>
</sect4>
</sect3> </sect3>
</sect2> </sect2>
<sect2 id="setting-console"> <sect2 id="setting-console">
<title>Console Setup</title> <title>Console Setup</title>
<para>For all 8-bit wide languages, set the correct console fonts <para>For all 8-bit wide languages, set the correct console fonts
in <filename>/etc/rc.conf</filename> for the language in in <filename>/etc/rc.conf</filename> for the language in question
question with:</para> with:</para>
<programlisting> <programlisting>
font8x16=<replaceable>font_name</replaceable> font8x16=<replaceable>font_name</replaceable>
font8x14=<replaceable>font_name</replaceable> font8x14=<replaceable>font_name</replaceable>
font8x8=<replaceable>font_name</replaceable></programlisting> font8x8=<replaceable>font_name</replaceable></programlisting>
<para><replaceable>font_name</replaceable> here taken from <para>The <replaceable>font_name</replaceable> here is taken from
<filename>/usr/share/syscons/fonts</filename> directory, the <filename>/usr/share/syscons/fonts</filename> directory,
without <filename>.fnt</filename> suffix.</para> without the <filename>.fnt</filename> suffix.</para>
<para>Also be sure to set the correct keymap and screenmap for <para>Also be sure to set the correct keymap and screenmap for your
your 8-bit language through 8-bit language through <filename>/stand/sysinstall</filename>.
<filename>/stand/sysinstall</filename>. Once inside sysinstall, Once inside sysinstall, choose <literal>Configure</literal>, then
choose <literal>Configure</literal>, then <literal>Console</literal>. Alternatively, you can add the
<literal>Console</literal>. Alternatively, you can add the following to <filename>/etc/rc.conf</filename>:</para>
following to <filename>/etc/rc.conf</filename>:</para>
<programlisting> <programlisting>
scrnmap=<replaceable>screenmap_name</replaceable> scrnmap=<replaceable>screenmap_name</replaceable>
keymap=<replaceable>keymap_name</replaceable> keymap=<replaceable>keymap_name</replaceable>
keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting> keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
<para><replaceable>screenmap_name</replaceable> here taken from <para>The <replaceable>screenmap_name</replaceable> here is taken
<filename>/usr/share/syscons/scrnmaps</filename> directory, from the <filename>/usr/share/syscons/scrnmaps</filename>
without <filename>.scm</filename> suffix. directory, without the <filename>.scm</filename> suffix. A
Screenmap with corresponding mapped font screenmap with a corresponding mapped font is usually needed as a
is usually needed as workaround for expanding workaround for expanding bit 8 to bit 9 on a VGA adapter's font
bit 8 to bit 9 on VGA adapter font character matrix character matrix in pseudographics area, i.e., to move letters out
in pseudographics area, i.e. of that area if screen font uses a bit 8 column.</para>
to move letters out of that area if screen font use bit 8
column.</para>
<para>If you use &man.moused.8;, i.e. have <para>According to the &man.moused.8; man page, you should have the
following setting in <filename>/etc/rc.conf</filename>:</para> following setting in <filename>/etc/rc.conf</filename>:</para>
<programlisting> <programlisting>
moused_enable="YES"</programlisting> moused_enable="YES"</programlisting>
<para>and your screen font uses bit 8 column of font <para>If your screen font uses bit 8 column of font character
character matrix, matrix, be sure that you compile your kernel with the following
be shure that you compile your kernel with</para> options in your kernel configuration file to avoid bit 8 to bit 9
expansion of the font character with the mouse cursor on VGA
adapters.</para>
<programlisting> <programlisting>
options SC_MOUSE_CHAR=0x03</programlisting> options SC_MOUSE_CHAR=0x03</programlisting>
<para>in your kernel configuration file to avoid <para>The <replaceable>keymap_name</replaceable> here is taken from
bit 8 to bit 9 expansion of the font character the <filename>/usr/share/syscons/keymaps</filename> directory,
under mouse cursor on VGA adapters. without the <filename>.kbd</filename> suffix.</para>
</para>
<para><replaceable>keymap_name</replaceable> here taken from <para>The <literal>keychange</literal> is usually needed to program
<filename>/usr/share/syscons/keymaps</filename> directory, function keys to match the selected terminal type because
without <filename>.kbd</filename> suffix.</para> function key sequences can not be defined in the key map.</para>
<para><literal>keychange</literal> is usually needed <para>Also be sure to set the correct console terminal type in
to program function keys to match selected terminal <filename>/etc/ttys</filename> for all <literal>ttyv*</literal>
type because function keys sequences can't be defined in entries. Current pre-defined correspondences are:</para>
key map.</para>
<para>Also be shure to set correct console terminal type in <informaltable frame="none">
<filename>/etc/ttys</filename> for all <tgroup cols="2">
<literal>ttyv*</literal> entries. <thead>
Current pre-defined correspondences are:</para> <row>
<entry>Character Set</entry>
<entry>Terminal Type</entry>
</row>
</thead>
<informaltable frame="none"> <tbody>
<tgroup cols="2"> <row>
<thead> <entry>ISO-8859-1 or ISO-8859-15</entry>
<row> <entry><literal>cons25l1</literal></entry>
<entry>Character Set</entry> </row>
<entry>Terminal Type</entry>
</row>
</thead>
<tbody> <row>
<row> <entry>ISO-8859-2</entry>
<entry>ISO-8859-1 or ISO-8859-15</entry> <entry><literal>cons25l2</literal></entry>
<entry><literal>cons25l1</literal></entry> </row>
</row>
<row> <row>
<entry>ISO-8859-2</entry> <entry>KOI8-R</entry>
<entry><literal>cons25l2</literal></entry> <entry><literal>cons25r</literal></entry>
</row> </row>
<row> <row>
<entry>KOI8-R</entry> <entry>CP437 (hardware default)</entry>
<entry><literal>cons25r</literal></entry> <entry><literal>cons25</literal></entry>
</row> </row>
</tbody>
</tgroup>
</informaltable>
<row> <para>For 16-bit wide languages, use the correct FreeBSD port in
<entry>CP437 (hardware default)</entry> your <filename>/usr/ports/<replaceable>language</replaceable></filename>
<entry><literal>cons25</literal></entry> directory. Some ports appear as console while the system sees it
</row> as serial vtty's, hence you must reserve enough vtty's for both
X11 and the pseudo-serial console. Here is a partial list of
applications for using other languages in console:</para>
</tbody> <informaltable frame="none">
</tgroup> <tgroup cols="2">
</informaltable> <thead>
<row>
<entry>Language</entry>
<entry>Location</entry>
</row>
</thead>
<para>For 16-bit wide languages, use the correct FreeBSD Port in your <tbody>
<filename>/usr/ports/<replaceable>language</replaceable></filename> <row>
directory. Some ports appear as console while the systems sees <entry>Traditional Chinese (BIG-5)</entry>
it as serial vtty's, hence you must reserve enough vtty's for <entry><filename>/usr/ports/chinese/big5con</filename></entry>
both X11 and the pseudo-serial console. Here is a partial list of </row>
applications for using other languages in console:</para>
<informaltable frame="none"> <row>
<tgroup cols="2"> <entry>Japanese</entry>
<thead> <entry><filename>/usr/ports/japanese/ja-kon2-*</filename> or
<row> <filename>/usr/ports/japanese/Mule_Wnn</filename></entry>
<entry>Language</entry> </row>
<entry>Location</entry>
</row>
</thead>
<tbody> <row>
<row> <entry>Korean</entry>
<entry>Traditional Chinese (BIG-5)</entry> <entry><filename>/usr/ports/korean/ko-han</filename></entry>
<entry><filename>/usr/ports/chinese/big5con</filename></entry> </row>
</row> </tbody>
</tgroup>
</informaltable>
</sect2>
<row> <sect2>
<entry>Japanese</entry> <title>X11 Setup</title>
<entry><filename>/usr/ports/japanese/ja-kon2-*</filename>
or <filename>/usr/ports/japanese/Mule_Wnn</filename></entry>
</row>
<row> <para>Although X11 is not part of the FreeBSD Project, we have
<entry>Korean</entry> included some information here for FreeBSD users. For more
<entry><filename>/usr/ports/korean/ko-han</filename></entry> details, refer to the <ulink url="http://www.xfree86.org/">XFree86
</row> website</ulink> or whichever X11 Server you use.</para>
</tbody> <para>In <filename>~/.Xresources</filename>, you can additionally
</tgroup> tune application specific i18n settings (e.g., fonts, menus,
</informaltable> etc.).</para>
</sect2>
<sect2> <sect3>
<title>X11 Setup</title> <title>Displaying Fonts</title>
<para>Although X11 is not part of the FreeBSD Project, we have <para>Install the X11 True Type-Common server (XTT-common) and
included some information here for FreeBSD users. For more install the language truetype fonts. Setting the correct
details, refer to the <ulink locale should allow you to view your selected language in menus
url="http://www.xfree86.org/">XFree86 website</ulink> or and such.</para>
whichever X11 Server you use.</para> </sect3>
<para>In <filename>~/.Xresources</filename>, you can <sect3>
additionly tune <title>Inputting Non-English Characters</title>
application specific i18n settings (e.g., fonts, menus,
etc.).</para>
<sect3> <para>The X11 Input Method (XIM) Protocol is a new standard for
<title>Displaying Fonts</title> all X11 clients. All X11 applications should be written as XIM
clients that take input from XIM Input servers. There are
several XIM servers available for different languages.</para>
</sect3>
</sect2>
<para>Install the X11 True Type-Common server (XTT-common) and <sect2>
install the language truetype fonts. Setting the correct <title>Printer Setup</title>
locale should allow you to view your selected language in
menus and such.</para>
</sect3>
<sect3> <para>8-bit characters are usually hardware coded into printers.
<title>Inputting Non-English Characters</title> 16-bit characters require special setup and we recommend using
<application>apsfilter</application>. You may also convert the
document to Postscript or PDF formats using language specific
converters.</para>
</sect2>
<para>The X11 Input Method (XIM) Protocol is a new standard for <sect2>
all X11 clients. All X11 applications should be written as XIM <title>Kernel and File Systems</title>
clients that take input from XIM Input servers. There are
several XIM servers available for different languages.</para>
</sect3>
</sect2>
<sect2> <para>The FreeBSD FFS filesystem is 8-bit clean so can be used with
<title>Printer Setup</title> any 8-bit wide character set, but there is no character set name
stored in the filesystem; i.e., it is raw 8-bit and does not know
anything about encoding order. FFS does not support any form of
16-bit wide character sets yet.</para>
<para>8-bit characters are usually hardware coded into printers. <para>The FreeBSD MSDOS filesystem has the configurable ability to
16-bit characters require special setup and we recommend using convertbetween MSDOS plus Unicode character sets and choosen
<command>apsfilter</command>. FreeBSD filesystem character sets. See &man.mount.msdos.8; for
You may also convert the document to Postscript or details.</para>
PDF formats using language specific converters.</para> </sect2>
</sect2>
<sect2>
<title>Kernel and File Systems</title>
<para>FreeBSD FFS filesystem is 8-bit clean so can be used
with any 8-bit wide character set, but there is no character
set name stored in filesystem, i.e. it is raw 8-bit and not
knows anything about encoding order. FFS not support any
form of 16-bit wide character sets yet.
</para>
<para>FreeBSD MSDOS filesystem have configurable
ability to proceed conversion between
MSDOS plus Unicode character sets and choosed
FreeBSD filesystem character set, see
&man.mount.msdos.8; for details.</para>
</sect2>
</sect1> </sect1>
<sect1> <sect1>
@ -652,24 +627,23 @@ options SC_MOUSE_CHAR=0x03</programlisting>
</sect1> </sect1>
<sect1> <sect1>
<title>Localizing FreeBSD to Specific Language</title> <title>Localizing FreeBSD to Specific Languages</title>
<sect2> <sect2>
<title>Russian Language (KOI8-R encoding)</title> <title>Russian Language (KOI8-R encoding)</title>
<para><emphasis>Originally contributed by <para><emphasis>Originally contributed by
&a.ache;.</emphasis></para> &a.ache;.</emphasis></para>
<para>See more info about KOI8-R encoding at <ulink <para>For more information about KOI8-R encoding, see the <ulink
url="http://nagual.pp.ru/~ache/koi8.html">KOI8-R References url="http://nagual.pp.ru/~ache/koi8.html">KOI8-R References
(Russian Net Character Set)</ulink>.</para> (Russian Net Character Set)</ulink>.</para>
<sect3> <sect3>
<title>Locale Setup</title> <title>Locale Setup</title>
<para>Put following lines into <para>Put the following lines into your
your <filename>~/.login_conf</filename> <filename>~/.login_conf</filename> file:</para>
file:</para>
<programlisting> <programlisting>
me:My Account:\ me:My Account:\
@ -684,20 +658,19 @@ me:My Account:\
<title>Console Setup</title> <title>Console Setup</title>
<itemizedlist> <itemizedlist>
<listitem>
<para>Add the following to your kernel configuration
file:</para>
<listitem> <programlisting>
<para>Add</para> options SC_MOUSE_CHAR=0x03</programlisting>
</listitem>
<programlisting> <listitem>
options SC_MOUSE_CHAR=0x03</programlisting> <para>Use following settings in
<filename>/etc/rc.conf</filename>:</para>
<para>to your kernel configuration file.</para> <programlisting>
</listitem>
<listitem>
<para>Use following settings in
<filename>/etc/rc.conf</filename>:</para>
<programlisting>
keymap="ru.koi8-r" keymap="ru.koi8-r"
keychange="61 ^[[K" keychange="61 ^[[K"
scrnmap="koi8-r2cp866" scrnmap="koi8-r2cp866"
@ -705,23 +678,21 @@ font8x16="cp866b-8x16"
font8x14="cp866-8x14" font8x14="cp866-8x14"
font8x8="cp866-8x8"</programlisting> font8x8="cp866-8x8"</programlisting>
<para>Note that <literal>^[</literal> here stands for real <para>Note that the <literal>^[</literal> here stands for a
Escape character \033 entered directly in real Escape character (\033) entered directly in
<filename>/etc/rc.conf</filename>, not for sequence of two <filename>/etc/rc.conf</filename>, not for sequence of two
characters '^' and '['.</para> characters '^' and '['.</para>
</listitem> </listitem>
<listitem>
<para>For each <literal>ttyv*</literal> entry in
<filename>/etc/ttys</filename> use <literal>cons25r</literal>
as terminal type.</para>
</listitem>
<listitem>
<para>For each <literal>ttyv*</literal> entry in
<filename>/etc/ttys</filename>, use
<literal>cons25r</literal>as the terminal type.</para>
</listitem>
</itemizedlist> </itemizedlist>
<para>See earlier in this chapter for examples of setting up the <para>See earlier in this chapter for examples of setting up the
<link linkend="setting-console">console</link>.</para> <link linkend="setting-console">console</link>.</para>
</sect3> </sect3>
<sect3> <sect3>
@ -805,9 +776,9 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
<para>To activate a Russian keyboard add a <para>To activate a Russian keyboard add a
<programlisting>XkbKeymap "xfree86(ru)"</programlisting> <programlisting>XkbKeymap "xfree86(ru)"</programlisting>
line into the <literal>"Keyboard"</literal> line into the <literal>"Keyboard"</literal>
section in your <filename>/etc/XF86Config</filename> file. Also section in your <filename>/etc/XF86Config</filename> file.
make sure that <literal>XkbDisable</literal> is turned off Also make sure that <literal>XkbDisable</literal> is turned
(commented out) there.</para> off (commented out) there.</para>
<para>The RUS/LAT switch will be <literal>CapsLock</literal>. <para>The RUS/LAT switch will be <literal>CapsLock</literal>.
The old <literal>CapsLock</literal> function is still The old <literal>CapsLock</literal> function is still
@ -824,8 +795,8 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
NULL);</literal> function early in the program. NULL);</literal> function early in the program.
See <ulink See <ulink
url="http://nagual.pp.ru/~ache/koi8/xwin.html"> url="http://nagual.pp.ru/~ache/koi8/xwin.html">
KOI8-R for X-Window</ulink> for more KOI8-R for X-Window</ulink> for more instructions on
instructions for localizing X11 applications.</para> localizing X11 applications.</para>
</note> </note>
</listitem> </listitem>
</orderedlist> </orderedlist>

View file

@ -75,10 +75,10 @@
convention.</para> convention.</para>
<para>Localization settings are based on three main terms: <para>Localization settings are based on three main terms:
Language Code, Country Code and Encoding. Locale name constructed Language Code, Country Code, and Encoding. Locale names are
with this three parts as follows:</para> constructed from these parts as follows:</para>
<programlisting> <programlisting>
<replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting> <replaceable>LanguageCode</replaceable>_<replaceable>CountryCode</replaceable>.<replaceable>Encoding</replaceable></programlisting>
<sect2> <sect2>
@ -125,19 +125,16 @@
<sect2> <sect2>
<title>Encodings</title> <title>Encodings</title>
<para>Some languages use non-ASCII encodings <para>Some languages use non-ASCII encodings that are 8-bit or
that are 8-bit or 16-bit wide characters. 16-bit wide characters. Older applications do not recognize them
Older applications do not recognize and mistake them for control characters. Newer applications
them and mistake them for control characters. Newer applications usually do recognize 8-bit characters. Depending on the
usually implementation, users may be required to compile an application
do recognize 8-bit characters. Depending on implementation, users with 16-bit support, or configure it correctly. To be able to
may be required to compile an application with 16-bit support, input and process 16-bit wide characters, the <ulink
or configure it correctly. url="../ports/">FreeBSD Ports collection</ulink> has provided
To be able to input and process each language with different programs. Refer to the i18n
16-bit wide characters, the <ulink url="../ports/">FreeBSD Ports documentation in the respective FreeBSD Port.</para>
collection</ulink> has provided each language with different
programs. Refer to the i18n documentation in the respective
FreeBSD Port.</para>
<para>Specifically, the user needs to look at the application <para>Specifically, the user needs to look at the application
documentation to decide on how to configure it correctly or to documentation to decide on how to configure it correctly or to
@ -147,19 +144,18 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>Language specific 8-bit wide character sets, f.e. <para>Language specific 8-bit wide character sets, i.e.,
ISO_8859-1, KOI8-R, CP437.</para> ISO_8859-1, KOI8-R, CP437.</para>
</listitem> </listitem>
<listitem> <listitem>
<para>16-bit wide encodings, f.e. EUC, Big5.</para> <para>16-bit wide encodings, f.e. EUC, Big5.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<para>You can check active list of character sets at <para>You can check the active list of character sets at the
<ulink <ulink
url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</ulink>.</para> url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</ulink>.</para>
</sect2> </sect2>
<sect2> <sect2>
@ -169,24 +165,20 @@ url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</
have been named with <literal>i18n</literal> in their names for have been named with <literal>i18n</literal> in their names for
easy identification. However, they do not always support the easy identification. However, they do not always support the
language needed.</para> language needed.</para>
</sect2> </sect2>
<sect2 id="setting-locale"> <sect2 id="setting-locale">
<title>Setting Locale</title> <title>Setting Locale</title>
<para>Theoretically, one only needs to export the value of his/her <para>Theoretically, one only needs to export the value of his/her
locale name as <envar>LANG</envar> locale name as <envar>LANG</envar> in the login shell and is
in the login shell and is usually done usually done through the user's
through the user's <filename>~/.login_conf</filename> or <filename>~/.login_conf</filename> or the user login shell
the user login shell configuration configuration (<filename>~/.profile</filename>,
(<filename>~/.profile</filename>, <filename>~/.bashrc</filename>, <filename>~/.bashrc</filename>, <filename>~/.cshrc</filename>).
<filename>~/.cshrc</filename>). This should set all of the locale subsets (such as
This should set all of the locale <envar>LC_CTYPE</envar>, <envar>LC_CTIME</envar>, etc.). Please
subsets (such as <envar>LC_CTYPE</envar>, refer to language-specific FreeBSD documentation for more
<envar>LC_CTIME</envar>, etc.).
Please refer to
language-specific FreeBSD documentation for more
information.</para> information.</para>
<para>You should set the following two values in your configuration <para>You should set the following two values in your configuration
@ -211,365 +203,348 @@ url="ftp://ftp.isi.edu/in-notes/iana/assignments/character-sets">IANA Registry</
<title>Setting Locale Methods</title> <title>Setting Locale Methods</title>
<para>There are two methods for setting locale, and both are <para>There are two methods for setting locale, and both are
described below. The first (recommended one) is by described below. The first (recommended one) is by assigning
setting environment variables assignment in the environment variables in <link linkend="login-class">login
<link linkend="login-class">login class</link>, class</link>, and the second is by adding the environment
and the second is by adding environment variables assignment variable assignments to the system's shell <link
to the system's shell linkend="startup-file">startup file</link>.</para>
<link linkend="startup-file">startup file</link>.</para>
<sect4 id="login-class"> <sect4 id="login-class">
<title>Login Classes Method</title> <title>Login Classes Method</title>
<para>This method allows to assing environment <para>This method allows environment variables needed for locale
variables needed for locale name and MIME character set once name and MIME character sets to be assigned once for every
for every possible shell instead of adding specific shell assignment possible shell instead of adding specific shell assignments to
to each shell startup file. each shell's startup file. <link linkend="usr-setup">User
<link linkend="usr-setup">User Level Setup</link> Level Setup</link> can be done by an user himself and <link
can be done by an user himself and linkend="adm-setup">Administrator Level Setup</link> require
<link linkend="adm-setup">Administrator Level Setup</link> require superuser priviledges.</para>
superuser priviledges.</para>
<sect5 id="usr-setup"> <sect5 id="usr-setup">
<title>User Level Setup</title> <title>User Level Setup</title>
<para>Here is minimal example of <filename>~/.login_conf</filename> <para>Here is a minimal example of a
file in user's home directory which have both variables set <filename>.login_conf</filename> file in user's home
for Russian KOI8-R encoding:</para> directory which has both variables set for Russian KOI8-R
encoding:</para>
<programlisting> <programlisting>
me:My Account:\ me:My Account:\
:charset=KOI8-R:\ :charset=KOI8-R:\
:lang=ru_RU.KOI8-R:</programlisting> :lang=ru_RU.KOI8-R:</programlisting>
<para>See <para>See <link linkend="adm-setup">Administrator Level
<link linkend="adm-setup">Administrator Level Setup</link> Setup</link> and &man.login.conf.5; for more details.</para>
and </sect5>
&man.login.conf.5; for explanation.</para>
</sect5> <sect5 id="adm-setup">
<title>Administrator Level Setup</title>
<sect5 id="adm-setup"> <para>Check that <filename>/etc/login.conf</filename> have the
<title>Administrator Level Setup</title> correct language user's class. Make sure these settings
appear in <filename>/etc/login.conf</filename>:</para>
<para>Check that <filename>/etc/login.conf</filename> have the <programlisting>
correct language user's class. Make sure these settings appear
in <filename>/etc/login.conf</filename>:</para>
<programlisting>
<replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\ <replaceable>language_name</replaceable>:<replaceable>accounts_title</replaceable>:\
:charset=<replaceable>MIME_charset</replaceable>:\ :charset=<replaceable>MIME_charset</replaceable>:\
:lang=<replaceable>locale_name</replaceable>:\ :lang=<replaceable>locale_name</replaceable>:\
:tc=default:</programlisting> :tc=default:</programlisting>
<para>So sticking with our previous example using Russian, it <para>So sticking with our previous example using Russian, it
would look like this:</para> would look like this:</para>
<programlisting> <programlisting>
russian:Russian Users Accounts:\ russian:Russian Users Accounts:\
:charset=KOI8-R:\ :charset=KOI8-R:\
:lang=ru_RU.KOI8-R:\ :lang=ru_RU.KOI8-R:\
:tc=default:</programlisting> :tc=default:</programlisting>
<para>Changing Login Classes with &man.vipw.8;:</para> <para>Changing Login Classes with &man.vipw.8;</para>
<para>Use <command>vipw</command> to add new users, and make the <para>Use <command>vipw</command> to add new users, and make
entry look like this:</para> the entry look like this:</para>
<programlisting> <programlisting>
user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting> user:password:1111:11:<replaceable>language</replaceable>:0:0:User Name:/home/user:/bin/sh</programlisting>
<para>Changing Login Classes with &man.adduser.8;:</para> <para>Changing Login Classes with &man.adduser.8;</para>
<para>Use <command>adduser</command> to add new users, and do <para>Use <command>adduser</command> to add new users, and do
the following:</para> the following:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>Set <programlisting>defaultclass = <replaceable>language</replaceable></programlisting> <para>Set <literal>defaultclass =
in <filename>/etc/adduser.conf</filename>. Keep in mind <replaceable>language</replaceable></literal> in
you must enter <literal>default</literal> class for all <filename>/etc/adduser.conf</filename>. Keep in mind
users of other languages in this case.</para> you must enter a <literal>default</literal> class for
</listitem> all users of other languages in this case.</para>
</listitem>
<listitem> <listitem>
<para>An alternative variant is answering the specified <para>An alternative variant is answering the specified
language each time that <screen><prompt>Enter login language each time that <screen><prompt>Enter login
class:</prompt> default []:</screen> appears from class:</prompt> default []:</screen> appears from
&man.adduser.8;</para> &man.adduser.8;</para>
</listitem> </listitem>
<listitem> <listitem>
<para>Another alternative is to use the following for each <para>Another alternative is to use the following for each
user of a different language that you wish to add:</para> user of a different language that you wish to
add:</para>
<screen>&prompt.root; <userinput>adduser -class <replaceable>language</replaceable></userinput></screen> <screen>&prompt.root; <userinput>adduser -class <replaceable>language</replaceable></userinput></screen>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
<para>Changing Login Classes with &man.pw.8;:</para> <para>Changing Login Classes with &man.pw.8;</para>
<para>If you use &man.pw.8; for adding new users, call it in <para>If you use &man.pw.8; for adding new users, call it in
this form:</para> this form:</para>
<screen>&prompt.root; <userinput>pw useradd <replaceable>user_name</replaceable> -L <replaceable>language</replaceable></userinput></screen> <screen>&prompt.root; <userinput>pw useradd <replaceable>user_name</replaceable> -L <replaceable>language</replaceable></userinput></screen>
</sect5> </sect5>
</sect4> </sect4>
<sect4 id="startup-file"> <sect4 id="startup-file">
<title>Shell Startup File Method</title> <title>Shell Startup File Method</title>
<note> <note>
<para>This method is not recommended because require <para>This method is not recommended because it requires a
different setup for each possible login program choosed. different setup for each possible login program chosen. Use
Use <link linkend="login-class">Login Class Method</link> the <link linkend="login-class">Login Class Method</link>
instead.</para> instead.</para>
</note> </note>
<para>To add locale name and MIME character set <para>To add the locale name and MIME character set, just set
just set the two environment variables shown below in the two environment variables shown below in the
the <filename>/etc/profile</filename> and/or <filename>/etc/profile</filename> and/or
<filename>/etc/csh.login</filename> shell startup files. We <filename>/etc/csh.login</filename> shell startup files. We
will use the Russian language as an example below:</para> will use the Russian language as an example below:</para>
<para>In <filename>/etc/profile</filename>:</para> <para>In <filename>/etc/profile</filename>:</para>
<programlisting> <programlisting>
<envar>LANG=ru_RU.KOI8-R; export LANG</envar> <envar>LANG=ru_RU.KOI8-R; export LANG</envar>
<envar>MM_CHARSET=KOI8-R; export MM_CHARSET</envar></programlisting> <envar>MM_CHARSET=KOI8-R; export MM_CHARSET</envar></programlisting>
<para>Or in <filename>/etc/csh.login</filename>:</para> <para>Or in <filename>/etc/csh.login</filename>:</para>
<programlisting> <programlisting>
<envar>setenv LANG ru_RU.KOI8-R</envar> <envar>setenv LANG ru_RU.KOI8-R</envar>
<envar>setenv MM_CHARSET KOI8-R</envar></programlisting> <envar>setenv MM_CHARSET KOI8-R</envar></programlisting>
<para>Alternatively, you can add the above instructions to <para>Alternatively, you can add the above instructions to
<filename>/usr/share/skel/dot.profile</filename> (similar to <filename>/usr/share/skel/dot.profile</filename> (similar to
what was used in <filename>/etc/profile</filename> above), or what was used in <filename>/etc/profile</filename> above), or
<filename>/usr/share/skel/dot.login</filename> (similar to what <filename>/usr/share/skel/dot.login</filename> (similar to
was used in <filename>/etc/csh.login</filename> above).</para> what was used in <filename>/etc/csh.login</filename>
above).</para>
<para>For X11:</para> <para>For X11:</para>
<para>In <filename>$HOME/.xinitrc</filename>:</para> <para>In <filename>$HOME/.xinitrc</filename>:</para>
<programlisting> <programlisting>
<envar>LANG=ru_RU.KOI8-R; export LANG</envar></programlisting> <envar>LANG=ru_RU.KOI8-R; export LANG</envar></programlisting>
<para>Or:</para> <para>Or:</para>
<programlisting> <programlisting>
<envar>setenv LANG ru_RU.KOI8-R</envar></programlisting> <envar>setenv LANG ru_RU.KOI8-R</envar></programlisting>
<para>Depending on your shell (see above).</para> <para>Depending on your shell (see above).</para>
</sect4>
</sect4>
</sect3> </sect3>
</sect2> </sect2>
<sect2 id="setting-console"> <sect2 id="setting-console">
<title>Console Setup</title> <title>Console Setup</title>
<para>For all 8-bit wide languages, set the correct console fonts <para>For all 8-bit wide languages, set the correct console fonts
in <filename>/etc/rc.conf</filename> for the language in in <filename>/etc/rc.conf</filename> for the language in question
question with:</para> with:</para>
<programlisting> <programlisting>
font8x16=<replaceable>font_name</replaceable> font8x16=<replaceable>font_name</replaceable>
font8x14=<replaceable>font_name</replaceable> font8x14=<replaceable>font_name</replaceable>
font8x8=<replaceable>font_name</replaceable></programlisting> font8x8=<replaceable>font_name</replaceable></programlisting>
<para><replaceable>font_name</replaceable> here taken from <para>The <replaceable>font_name</replaceable> here is taken from
<filename>/usr/share/syscons/fonts</filename> directory, the <filename>/usr/share/syscons/fonts</filename> directory,
without <filename>.fnt</filename> suffix.</para> without the <filename>.fnt</filename> suffix.</para>
<para>Also be sure to set the correct keymap and screenmap for <para>Also be sure to set the correct keymap and screenmap for your
your 8-bit language through 8-bit language through <filename>/stand/sysinstall</filename>.
<filename>/stand/sysinstall</filename>. Once inside sysinstall, Once inside sysinstall, choose <literal>Configure</literal>, then
choose <literal>Configure</literal>, then <literal>Console</literal>. Alternatively, you can add the
<literal>Console</literal>. Alternatively, you can add the following to <filename>/etc/rc.conf</filename>:</para>
following to <filename>/etc/rc.conf</filename>:</para>
<programlisting> <programlisting>
scrnmap=<replaceable>screenmap_name</replaceable> scrnmap=<replaceable>screenmap_name</replaceable>
keymap=<replaceable>keymap_name</replaceable> keymap=<replaceable>keymap_name</replaceable>
keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting> keychange="<replaceable>fkey_number sequence</replaceable>"</programlisting>
<para><replaceable>screenmap_name</replaceable> here taken from <para>The <replaceable>screenmap_name</replaceable> here is taken
<filename>/usr/share/syscons/scrnmaps</filename> directory, from the <filename>/usr/share/syscons/scrnmaps</filename>
without <filename>.scm</filename> suffix. directory, without the <filename>.scm</filename> suffix. A
Screenmap with corresponding mapped font screenmap with a corresponding mapped font is usually needed as a
is usually needed as workaround for expanding workaround for expanding bit 8 to bit 9 on a VGA adapter's font
bit 8 to bit 9 on VGA adapter font character matrix character matrix in pseudographics area, i.e., to move letters out
in pseudographics area, i.e. of that area if screen font uses a bit 8 column.</para>
to move letters out of that area if screen font use bit 8
column.</para>
<para>If you use &man.moused.8;, i.e. have <para>According to the &man.moused.8; man page, you should have the
following setting in <filename>/etc/rc.conf</filename>:</para> following setting in <filename>/etc/rc.conf</filename>:</para>
<programlisting> <programlisting>
moused_enable="YES"</programlisting> moused_enable="YES"</programlisting>
<para>and your screen font uses bit 8 column of font <para>If your screen font uses bit 8 column of font character
character matrix, matrix, be sure that you compile your kernel with the following
be shure that you compile your kernel with</para> options in your kernel configuration file to avoid bit 8 to bit 9
expansion of the font character with the mouse cursor on VGA
adapters.</para>
<programlisting> <programlisting>
options SC_MOUSE_CHAR=0x03</programlisting> options SC_MOUSE_CHAR=0x03</programlisting>
<para>in your kernel configuration file to avoid <para>The <replaceable>keymap_name</replaceable> here is taken from
bit 8 to bit 9 expansion of the font character the <filename>/usr/share/syscons/keymaps</filename> directory,
under mouse cursor on VGA adapters. without the <filename>.kbd</filename> suffix.</para>
</para>
<para><replaceable>keymap_name</replaceable> here taken from <para>The <literal>keychange</literal> is usually needed to program
<filename>/usr/share/syscons/keymaps</filename> directory, function keys to match the selected terminal type because
without <filename>.kbd</filename> suffix.</para> function key sequences can not be defined in the key map.</para>
<para><literal>keychange</literal> is usually needed <para>Also be sure to set the correct console terminal type in
to program function keys to match selected terminal <filename>/etc/ttys</filename> for all <literal>ttyv*</literal>
type because function keys sequences can't be defined in entries. Current pre-defined correspondences are:</para>
key map.</para>
<para>Also be shure to set correct console terminal type in <informaltable frame="none">
<filename>/etc/ttys</filename> for all <tgroup cols="2">
<literal>ttyv*</literal> entries. <thead>
Current pre-defined correspondences are:</para> <row>
<entry>Character Set</entry>
<entry>Terminal Type</entry>
</row>
</thead>
<informaltable frame="none"> <tbody>
<tgroup cols="2"> <row>
<thead> <entry>ISO-8859-1 or ISO-8859-15</entry>
<row> <entry><literal>cons25l1</literal></entry>
<entry>Character Set</entry> </row>
<entry>Terminal Type</entry>
</row>
</thead>
<tbody> <row>
<row> <entry>ISO-8859-2</entry>
<entry>ISO-8859-1 or ISO-8859-15</entry> <entry><literal>cons25l2</literal></entry>
<entry><literal>cons25l1</literal></entry> </row>
</row>
<row> <row>
<entry>ISO-8859-2</entry> <entry>KOI8-R</entry>
<entry><literal>cons25l2</literal></entry> <entry><literal>cons25r</literal></entry>
</row> </row>
<row> <row>
<entry>KOI8-R</entry> <entry>CP437 (hardware default)</entry>
<entry><literal>cons25r</literal></entry> <entry><literal>cons25</literal></entry>
</row> </row>
</tbody>
</tgroup>
</informaltable>
<row> <para>For 16-bit wide languages, use the correct FreeBSD port in
<entry>CP437 (hardware default)</entry> your <filename>/usr/ports/<replaceable>language</replaceable></filename>
<entry><literal>cons25</literal></entry> directory. Some ports appear as console while the system sees it
</row> as serial vtty's, hence you must reserve enough vtty's for both
X11 and the pseudo-serial console. Here is a partial list of
applications for using other languages in console:</para>
</tbody> <informaltable frame="none">
</tgroup> <tgroup cols="2">
</informaltable> <thead>
<row>
<entry>Language</entry>
<entry>Location</entry>
</row>
</thead>
<para>For 16-bit wide languages, use the correct FreeBSD Port in your <tbody>
<filename>/usr/ports/<replaceable>language</replaceable></filename> <row>
directory. Some ports appear as console while the systems sees <entry>Traditional Chinese (BIG-5)</entry>
it as serial vtty's, hence you must reserve enough vtty's for <entry><filename>/usr/ports/chinese/big5con</filename></entry>
both X11 and the pseudo-serial console. Here is a partial list of </row>
applications for using other languages in console:</para>
<informaltable frame="none"> <row>
<tgroup cols="2"> <entry>Japanese</entry>
<thead> <entry><filename>/usr/ports/japanese/ja-kon2-*</filename> or
<row> <filename>/usr/ports/japanese/Mule_Wnn</filename></entry>
<entry>Language</entry> </row>
<entry>Location</entry>
</row>
</thead>
<tbody> <row>
<row> <entry>Korean</entry>
<entry>Traditional Chinese (BIG-5)</entry> <entry><filename>/usr/ports/korean/ko-han</filename></entry>
<entry><filename>/usr/ports/chinese/big5con</filename></entry> </row>
</row> </tbody>
</tgroup>
</informaltable>
</sect2>
<row> <sect2>
<entry>Japanese</entry> <title>X11 Setup</title>
<entry><filename>/usr/ports/japanese/ja-kon2-*</filename>
or <filename>/usr/ports/japanese/Mule_Wnn</filename></entry>
</row>
<row> <para>Although X11 is not part of the FreeBSD Project, we have
<entry>Korean</entry> included some information here for FreeBSD users. For more
<entry><filename>/usr/ports/korean/ko-han</filename></entry> details, refer to the <ulink url="http://www.xfree86.org/">XFree86
</row> website</ulink> or whichever X11 Server you use.</para>
</tbody> <para>In <filename>~/.Xresources</filename>, you can additionally
</tgroup> tune application specific i18n settings (e.g., fonts, menus,
</informaltable> etc.).</para>
</sect2>
<sect2> <sect3>
<title>X11 Setup</title> <title>Displaying Fonts</title>
<para>Although X11 is not part of the FreeBSD Project, we have <para>Install the X11 True Type-Common server (XTT-common) and
included some information here for FreeBSD users. For more install the language truetype fonts. Setting the correct
details, refer to the <ulink locale should allow you to view your selected language in menus
url="http://www.xfree86.org/">XFree86 website</ulink> or and such.</para>
whichever X11 Server you use.</para> </sect3>
<para>In <filename>~/.Xresources</filename>, you can <sect3>
additionly tune <title>Inputting Non-English Characters</title>
application specific i18n settings (e.g., fonts, menus,
etc.).</para>
<sect3> <para>The X11 Input Method (XIM) Protocol is a new standard for
<title>Displaying Fonts</title> all X11 clients. All X11 applications should be written as XIM
clients that take input from XIM Input servers. There are
several XIM servers available for different languages.</para>
</sect3>
</sect2>
<para>Install the X11 True Type-Common server (XTT-common) and <sect2>
install the language truetype fonts. Setting the correct <title>Printer Setup</title>
locale should allow you to view your selected language in
menus and such.</para>
</sect3>
<sect3> <para>8-bit characters are usually hardware coded into printers.
<title>Inputting Non-English Characters</title> 16-bit characters require special setup and we recommend using
<application>apsfilter</application>. You may also convert the
document to Postscript or PDF formats using language specific
converters.</para>
</sect2>
<para>The X11 Input Method (XIM) Protocol is a new standard for <sect2>
all X11 clients. All X11 applications should be written as XIM <title>Kernel and File Systems</title>
clients that take input from XIM Input servers. There are
several XIM servers available for different languages.</para>
</sect3>
</sect2>
<sect2> <para>The FreeBSD FFS filesystem is 8-bit clean so can be used with
<title>Printer Setup</title> any 8-bit wide character set, but there is no character set name
stored in the filesystem; i.e., it is raw 8-bit and does not know
anything about encoding order. FFS does not support any form of
16-bit wide character sets yet.</para>
<para>8-bit characters are usually hardware coded into printers. <para>The FreeBSD MSDOS filesystem has the configurable ability to
16-bit characters require special setup and we recommend using convertbetween MSDOS plus Unicode character sets and choosen
<command>apsfilter</command>. FreeBSD filesystem character sets. See &man.mount.msdos.8; for
You may also convert the document to Postscript or details.</para>
PDF formats using language specific converters.</para> </sect2>
</sect2>
<sect2>
<title>Kernel and File Systems</title>
<para>FreeBSD FFS filesystem is 8-bit clean so can be used
with any 8-bit wide character set, but there is no character
set name stored in filesystem, i.e. it is raw 8-bit and not
knows anything about encoding order. FFS not support any
form of 16-bit wide character sets yet.
</para>
<para>FreeBSD MSDOS filesystem have configurable
ability to proceed conversion between
MSDOS plus Unicode character sets and choosed
FreeBSD filesystem character set, see
&man.mount.msdos.8; for details.</para>
</sect2>
</sect1> </sect1>
<sect1> <sect1>
@ -652,24 +627,23 @@ options SC_MOUSE_CHAR=0x03</programlisting>
</sect1> </sect1>
<sect1> <sect1>
<title>Localizing FreeBSD to Specific Language</title> <title>Localizing FreeBSD to Specific Languages</title>
<sect2> <sect2>
<title>Russian Language (KOI8-R encoding)</title> <title>Russian Language (KOI8-R encoding)</title>
<para><emphasis>Originally contributed by <para><emphasis>Originally contributed by
&a.ache;.</emphasis></para> &a.ache;.</emphasis></para>
<para>See more info about KOI8-R encoding at <ulink <para>For more information about KOI8-R encoding, see the <ulink
url="http://nagual.pp.ru/~ache/koi8.html">KOI8-R References url="http://nagual.pp.ru/~ache/koi8.html">KOI8-R References
(Russian Net Character Set)</ulink>.</para> (Russian Net Character Set)</ulink>.</para>
<sect3> <sect3>
<title>Locale Setup</title> <title>Locale Setup</title>
<para>Put following lines into <para>Put the following lines into your
your <filename>~/.login_conf</filename> <filename>~/.login_conf</filename> file:</para>
file:</para>
<programlisting> <programlisting>
me:My Account:\ me:My Account:\
@ -684,20 +658,19 @@ me:My Account:\
<title>Console Setup</title> <title>Console Setup</title>
<itemizedlist> <itemizedlist>
<listitem>
<para>Add the following to your kernel configuration
file:</para>
<listitem> <programlisting>
<para>Add</para> options SC_MOUSE_CHAR=0x03</programlisting>
</listitem>
<programlisting> <listitem>
options SC_MOUSE_CHAR=0x03</programlisting> <para>Use following settings in
<filename>/etc/rc.conf</filename>:</para>
<para>to your kernel configuration file.</para> <programlisting>
</listitem>
<listitem>
<para>Use following settings in
<filename>/etc/rc.conf</filename>:</para>
<programlisting>
keymap="ru.koi8-r" keymap="ru.koi8-r"
keychange="61 ^[[K" keychange="61 ^[[K"
scrnmap="koi8-r2cp866" scrnmap="koi8-r2cp866"
@ -705,23 +678,21 @@ font8x16="cp866b-8x16"
font8x14="cp866-8x14" font8x14="cp866-8x14"
font8x8="cp866-8x8"</programlisting> font8x8="cp866-8x8"</programlisting>
<para>Note that <literal>^[</literal> here stands for real <para>Note that the <literal>^[</literal> here stands for a
Escape character \033 entered directly in real Escape character (\033) entered directly in
<filename>/etc/rc.conf</filename>, not for sequence of two <filename>/etc/rc.conf</filename>, not for sequence of two
characters '^' and '['.</para> characters '^' and '['.</para>
</listitem> </listitem>
<listitem>
<para>For each <literal>ttyv*</literal> entry in
<filename>/etc/ttys</filename> use <literal>cons25r</literal>
as terminal type.</para>
</listitem>
<listitem>
<para>For each <literal>ttyv*</literal> entry in
<filename>/etc/ttys</filename>, use
<literal>cons25r</literal>as the terminal type.</para>
</listitem>
</itemizedlist> </itemizedlist>
<para>See earlier in this chapter for examples of setting up the <para>See earlier in this chapter for examples of setting up the
<link linkend="setting-console">console</link>.</para> <link linkend="setting-console">console</link>.</para>
</sect3> </sect3>
<sect3> <sect3>
@ -805,9 +776,9 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
<para>To activate a Russian keyboard add a <para>To activate a Russian keyboard add a
<programlisting>XkbKeymap "xfree86(ru)"</programlisting> <programlisting>XkbKeymap "xfree86(ru)"</programlisting>
line into the <literal>"Keyboard"</literal> line into the <literal>"Keyboard"</literal>
section in your <filename>/etc/XF86Config</filename> file. Also section in your <filename>/etc/XF86Config</filename> file.
make sure that <literal>XkbDisable</literal> is turned off Also make sure that <literal>XkbDisable</literal> is turned
(commented out) there.</para> off (commented out) there.</para>
<para>The RUS/LAT switch will be <literal>CapsLock</literal>. <para>The RUS/LAT switch will be <literal>CapsLock</literal>.
The old <literal>CapsLock</literal> function is still The old <literal>CapsLock</literal> function is still
@ -824,8 +795,8 @@ FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/100dpi"</programlisting>
NULL);</literal> function early in the program. NULL);</literal> function early in the program.
See <ulink See <ulink
url="http://nagual.pp.ru/~ache/koi8/xwin.html"> url="http://nagual.pp.ru/~ache/koi8/xwin.html">
KOI8-R for X-Window</ulink> for more KOI8-R for X-Window</ulink> for more instructions on
instructions for localizing X11 applications.</para> localizing X11 applications.</para>
</note> </note>
</listitem> </listitem>
</orderedlist> </orderedlist>