commit cdcc1cb24e53834eb0fa026d7e99a6fb60ec710b
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Mar 8 05:04:42 2023 -0600
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Wed Mar 8 05:04:42 2023 -0600

    [docs]: Add Russian language support (5/x).
    
    * doc/groff.texi (Input Encodings, Manipulating Hyphenation):
    * man/groff_tmac.5.man (Localization packages, Input encodings):
      Document support for KOI8-R encoding and Russian language.

diff --git a/ChangeLog b/ChangeLog
index 453840772..b941189bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2023-03-08  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+	[docs]: Add Russian language support (5/x).
+
+	* doc/groff.texi (Input Encodings, Manipulating Hyphenation):
+	* man/groff_tmac.5.man (Localization packages, Input encodings):
+	Document support for KOI8-R encoding and Russian language.
+
 2023-03-08  G. Branden Robinson <g.branden.robinson@gmail.com>
 
 	[tmac]: Add Russian language support (4/x).
diff --git a/doc/groff.texi b/doc/groff.texi
index 7e300dbef..157c9cbee 100644
--- a/doc/groff.texi
+++ b/doc/groff.texi
@@ -5499,6 +5499,23 @@ The remaining encodings require support that is not built-in to the GNU
 @code{troff} executable; instead, they use macro packages.
 
 @table @code
+@item koi8-r
+@cindex encoding, input, @w{KOI8-R}
+@cindex @w{KOI8-R}, input encoding
+@cindex input encoding, @w{KOI8-R}
+@pindex koi8-r.tmac
+To use @w{KOI8-R}, an encoding for the Russian language, either place
+@w{@samp{.mso koi8-t.tmac}} at the very beginning of your document or
+supply @samp{-mkoi8-r} as a command-line argument to @code{groff}.  The
+localization file @file{ru.tmac} takes care of this automatically; see
+@ref{Manipulating Hyphenation}.@footnote{KOI8-R code points in the range
+@code{0x80}--@code{0x9F} are not valid input on systems using ISO
+character codings natively; see @code{Identifiers}.  This should be no
+impediment to practical documents, as these KOI8-R code points do not
+encode letters, but box-drawing symbols and characters that are better
+obtained via special character escape sequences; see the
+@cite{groff_char@r{(7)}} man page.}
+
 @item latin2
 @cindex encoding, input, @w{Latin-2} (ISO @w{8859-2})
 @cindex @w{Latin-2} (ISO @w{8859-2}), input encoding
@@ -8507,6 +8524,7 @@ together because they contradict; for instance, values 4 and@tie{}16,
 and values 8 and@tie{}32.  As noted, it is superfluous to add 1 to any
 nonzero even mode.
 
+@c TODO: Add @pindex for hyphenation pattern and exception files.
 @cindex hyphenation pattern files
 @cindex pattern files, for hyphenation
 The automatic placement of hyphens in words is determined by
@@ -8637,18 +8655,19 @@ be used.  By default, every code maps to itself except those for letters
 @pindex fr.tmac
 @pindex it.tmac
 @pindex ja.tmac
+@pindex ru.tmac
 @pindex sv.tmac
 @pindex zh.tmac
 The set of hyphenation patterns is associated with the language set by
 the @code{hla} request (see below).  The @code{hpf} request is usually
 invoked by a localization file loaded by the @file{troffrc} file.  By
 default, @file{troffrc} loads the localization file for
-English.@footnote{As of @code{groff} 1.23.0, localization files for
+English.@footnote{As of @code{groff} 1.23.1, localization files for
 Czech (@code{cs}), German (@code{de}), English (@code{en}), French
-(@code{fr}), Italian (@code{it}), Japanese (@code{ja}), Swedish
-(@code{sv}), and Chinese (@code{zh}) exist.}  For Western languages, the
-localization file sets the hyphenation mode and loads hyphenation
-patterns and exceptions.
+(@code{fr}), Italian (@code{it}), Japanese (@code{ja}), Russian
+(@code{ru}), Swedish (@code{sv}), and Chinese (@code{zh}) exist.}  For
+Western languages, the localization file sets the hyphenation mode and
+loads hyphenation patterns and exceptions.
 
 A second call to @code{hpf} (for the same language) replaces the
 hyphenation patterns with the new ones.  Invoking @code{hpf} or
diff --git a/man/groff_tmac.5.man b/man/groff_tmac.5.man
index 8126e594f..6eca61cbc 100644
--- a/man/groff_tmac.5.man
+++ b/man/groff_tmac.5.man
@@ -397,6 +397,21 @@ Japanese.
 .
 .
 .TP
+.I ru
+Russian;
+localizes
+.IR man ,
+.IR me ,
+.IR mm ,
+.IR mom ,
+and
+.IR ms .
+.
+Sets the input encoding to KOI8-R by loading
+.IR koi8-r.tmac .
+.
+.
+.TP
 .I sv
 Swedish;
 localizes
@@ -460,6 +475,23 @@ loads
 automatically at startup.
 .
 .
+.TP
+.I koi8\-r
+provides support for the KOI8-R encoding.
+.
+KOI8-R code points in the range 0x80\[en]0x9F are not valid input on
+systems using ISO character codings natively;
+see section \[lq]Identifiers\[rq] in
+.MR groff @MAN7EXT@ .
+.
+This should be no impediment to practical documents,
+as these KOI8-R code points do not encode letters,
+but box-drawing symbols and characters that are better obtained via
+special character escape sequences;
+see
+.MR groff_char @MAN7EXT@ .
+.
+.
 .P
 Because different input character codes constitute valid GNU
 .I troff \" GNU

commit adf3ee7668b7fae43b8ad7678ac2645b43a6b31e
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Mar 8 04:40:33 2023 -0600
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Wed Mar 8 04:40:33 2023 -0600

    [tmac]: Add Russian language support (4/x).
    
    * tmac/tmac.am (TMACNORMALFILES): Ship new Russian language support
      files.

diff --git a/ChangeLog b/ChangeLog
index 4f3d2995d..453840772 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-03-08  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+	[tmac]: Add Russian language support (4/x).
+
+	* tmac/tmac.am (TMACNORMALFILES): Ship new Russian language
+	support files.
+
 2023-03-08  G. Branden Robinson <g.branden.robinson@gmail.com>
 
 	[tmac]: Add Russian language support (3/x).
diff --git a/tmac/tmac.am b/tmac/tmac.am
index 437297acb..53d083af5 100644
--- a/tmac/tmac.am
+++ b/tmac/tmac.am
@@ -61,6 +61,7 @@ TMACNORMALFILES = \
   tmac/latin5.tmac \
   tmac/latin9.tmac \
   tmac/cp1047.tmac \
+  tmac/koi8-r.tmac \
   tmac/X.tmac \
   tmac/Xps.tmac \
   tmac/lj4.tmac \
@@ -85,6 +86,8 @@ TMACNORMALFILES = \
   tmac/hyphen.fr \
   tmac/it.tmac \
   tmac/hyphen.it \
+  tmac/ru.tmac \
+  tmac/hyphen.ru \
   tmac/sv.tmac \
   tmac/hyphen.sv \
   tmac/de.tmac \

commit 592d6e0337a4ccda0fd5f57fcd334b18a85730ec
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Mar 8 04:33:48 2023 -0600
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Wed Mar 8 04:33:48 2023 -0600

    [tmac]: Add Russian language support (3/x).
    
    * tmac/koi8-ru.tmac: Rename this file...
    * tmac/koi8-r.tmac: ...to this.  There _is_ a "KOI8-RU" encoding, which
      appears to subsume KOI8-B and KOI8-U (by replacing more box drawing
      characters), but this file does not remap their values to applicable
      Unicode code points.
    * tmac/ru.tmac: Load the encoding file under its new name.

diff --git a/ChangeLog b/ChangeLog
index f3f9f2589..4f3d2995d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2023-03-08  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+	[tmac]: Add Russian language support (3/x).
+
+	* tmac/koi8-ru.tmac: Rename this file...
+	* tmac/koi8-r.tmac: ...to this.  There _is_ a "KOI8-RU"
+	encoding, which appears to subsume KOI8-B and KOI8-U (by
+	replacing more box drawing characters), but this file does not
+	remap their values to applicable Unicode code points.
+	* tmac/ru.tmac: Load the encoding file under its new name.
+
 2023-03-08  G. Branden Robinson <g.branden.robinson@gmail.com>
 
 	[tmac]: Add Russian language support (2/x).
diff --git a/tmac/koi8-ru.tmac b/tmac/koi8-r.tmac
similarity index 93%
rename from tmac/koi8-ru.tmac
rename to tmac/koi8-r.tmac
index 2922cfe2d..a9c37de5b 100644
--- a/tmac/koi8-ru.tmac
+++ b/tmac/koi8-r.tmac
@@ -1,6 +1,6 @@
-.\" koi8-ru.tmac
+.\" koi8-r.tmac
 .\"
-.do nr *groff_koi8-ru_tmac_C \n[.cp]
+.do nr *groff_koi8-r_tmac_C \n[.cp]
 .cp 0
 .trin \[char163]\[u0451]
 .trin \[char179]\[u0401]
@@ -68,8 +68,8 @@
 .trin \[char253]\[u0429]
 .trin \[char254]\[u0427]
 .trin \[char255]\[u042A]
-.cp \n[*groff_koi8-ru_tmac_C]
-.do rr *groff_koi8-ru_tmac_C
+.cp \n[*groff_koi8-r_tmac_C]
+.do rr *groff_koi8-r_tmac_C
 .
 .\" Local Variables:
 .\" mode: nroff
diff --git a/tmac/ru.tmac b/tmac/ru.tmac
index 25c3515b7..e89749bce 100644
--- a/tmac/ru.tmac
+++ b/tmac/ru.tmac
@@ -154,7 +154,7 @@
 .
 .
 .\" Default encoding
-.mso koi8-ru.tmac
+.mso koi8-r.tmac
 .
 .ss 12 0
 .

commit 161c9f60c5388b64b7991d1c5f80b348330b489f
Author:     G. Branden Robinson <g.branden.robinson@gmail.com>
AuthorDate: Wed Mar 8 04:28:27 2023 -0600
Commit:     G. Branden Robinson <g.branden.robinson@gmail.com>
CommitDate: Wed Mar 8 04:28:27 2023 -0600

    [tmac]: Add Russian language support (2/x).
    
    * tmac/hyphen.ru:
    * tmac/ru.tmac: Update editor aids so these files can be edited more
      intelligibly using GNU Emacs.  Annotate apparent problem with Vim's
      KOI8-R support.

diff --git a/ChangeLog b/ChangeLog
index 76a71e2d2..f3f9f2589 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2023-03-08  G. Branden Robinson <g.branden.robinson@gmail.com>
+
+	[tmac]: Add Russian language support (2/x).
+
+	* tmac/hyphen.ru:
+	* tmac/ru.tmac: Update editor aids so these files can be edited
+	more intelligibly using GNU Emacs.  Annotate apparent problem
+	with Vim's KOI8-R support.
+
 2023-03-08  Nikita Ivanov <nikita.vyach.ivanov@gmail.com>
 
 	[tmac]: Add Russian language support (1/x).
diff --git a/tmac/hyphen.ru b/tmac/hyphen.ru
index a801de2e0..a554af013 100644
--- a/tmac/hyphen.ru
+++ b/tmac/hyphen.ru
@@ -4693,3 +4693,11 @@
 ÑÄÏ-ÚÕ-ÂÅ
 ÑÒÅÍ-ÎÏ-ÇÏ
 }
+
+% Local Variables:
+% mode: tex
+% coding: cyrillic-koi8
+% fill-column: 72
+% End:
+% XXX: Vim 8.2 does not handle koi8-r correctly.
+% vim: set filetype=groff textwidth=72:
diff --git a/tmac/ru.tmac b/tmac/ru.tmac
index bfb5d360f..25c3515b7 100644
--- a/tmac/ru.tmac
+++ b/tmac/ru.tmac
@@ -226,7 +226,8 @@
 .
 .\" Local Variables:
 .\" mode: nroff
-.\" coding: koi8-ru
+.\" coding: cyrillic-koi8
 .\" fill-column: 72
 .\" End:
+.\" XXX: Vim 8.2 does not handle koi8-r correctly.
 .\" vim: set filetype=groff textwidth=72:
