Comment 6 for bug 1107859

Revision history for this message
Dmitri Minaev (minaev) wrote : Re: Hyphenation doesn't work in Russian text

A bit more information on this bug.

1. A workaround is to force the execution of the following JS code on every web page:

var defaultLang = 'ru';

// set LANG attribute if missing
var head=document.getElementsByTagName('head').item(0);
var html=document.getElementsByTagName('html').item(0);
var lang = html.getAttribute('xml:lang');
if (lang != '' && lang != null) {
html.lang = lang;
} else if (html.lang == '') {
html.lang = defaultLang;
}
html.lang = html.lang.substr(0, 2);

(borrowed from http://txt.arboreus.com/2012/03/20/force-css-hyphenation-in-firefox-greasemonkey-script.html)

To do so, you can use Firefox extension 'dotjs': https://addons.mozilla.org/en-US/firefox/addon/dotjs/

2. Even then Russian hyphenation works with errors. On many occasions, hyphen is misplaced one or even two letters from its correct location: проб-ежал instead of про-бе-жал; трен-ировок instead of тре-ни-ро-вок; лаге-рь instead of ла-герь, обслуж-ивающего instead of об-слу-жи-ва-ю-ще-го; палатк-ами instead of па-лат-ка-ми; ск-оростью instead of ско-ростью, etc.

I have an impression that in Ubuntu 12.04 errors took place almost always. In Ubuntu 14.10, they constitute about 20% of all occasions.

However, these errors are only found in Ubuntu Firefox. If you download the vanilla Firefox from mozilla.org and run it using the same profile, hyphenation is correct.