#274 russian CP1251 codepage (with patch)

v3.8
closed-fixed
None
5
2014-11-07
2009-03-12
NoF8
No

joe ignores "export LANG=ru_RU.CP1251" and uses KOI8-R codepage instead of CP1251, at least under FreeBSD 6.2

The cause: utf8.c always sets KOI8-R encoding for all "RU" locales.

The effect: we can't edit UTF-8 text in CP1251 console, because it's converted to KOI8-R, not CP1251.

The patch against joe-3.7:
--- utf8.c.orig Fri Mar 13 00:55:10 2009
+++ utf8.c Fri Mar 13 00:59:19 2009
@@ -285,6 +285,7 @@
}
}

+ if (zstr(l, USTR "1251")) return USTR "CP1251";
if (zstr(l, USTR "KOI8-R")) return USTR "KOI8-R";
if (zstr(l, USTR "KOI8-U")) return USTR "KOI8-U";
if (zstr(l, USTR "620")) return USTR "TIS-620";

Some more info: there are several widely used codepages in Russian world, with KOI8-R dominating in Unix world and CP1251 dominating in Windows world. I prefer LANG=ru_RU.CP1251 because I work with lots of files encoded as CP1251.

Discussion

  • John J. Jordan
    John J. Jordan
    2014-11-03

    Submitted to Mercurial. Thanks!

     
  • John J. Jordan
    John J. Jordan
    2014-11-07

    • status: open --> closed-fixed
    • assigned_to: John J. Jordan
    • Group: --> v3.8