A
A
Andrey Prokopyuk2013-03-25 11:21:46
Programming
Andrey Prokopyuk, 2013-03-25 11:21:46

Ant on Ubuntu does not support Russian

The problem was noticed when Ant, after building scripts on the server (Ubuntu), replaced all Russian letters with question marks. There was no such problem on Windows. The Russian language is supported by the system, but Ant does not accept it even if the encoding is specified. Even simple <echo encoding="UTF-8">Русский текст</echo>outputs ??????? ?????.

Used Ubuntu 11.10 and ant 1.8.2. Ubuntu Russian localization packages are installed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Prokopyuk, 2013-03-25
@Andre_487

Found a solution. As it turned out, this is a common Java problem with encodings. The solution is somewhat shamanistic and it is this:
In the /usr/share/X11/locale/locale.dir file, replace the lines:

-ru_RU.UTF-8/XLC_LOCALE	ru_RU.UTF-8
+en_US.UTF-8/XLC_LOCALE	ru_RU.UTF-8

-ru_RU.UTF-8/XLC_LOCALE:	ru_RU.UTF-8
+en_US.UTF-8/XLC_LOCALE:	ru_RU.UTF-8

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question