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.
Submitted to Mercurial. Thanks!
Fixed in [66171b]
Related
Commit: [66171b]