How to deal with encoding?

ERROR: Socket error: Ð Ñоединении оÑказано
ERROR: In:
ERROR: [17] throw(error(socket_error(econnrefused,‘Ð\u0092 Ñ\u0081оединении оÑ\u0082казано’),_29264))
ERROR: [15] catch(socket:tcp_connect((0x26f08f0),…,_29312),error(socket_error(econnrefused,‘Ð\u0092 Ñ\u0081оединении оÑ\u0082казано’),_29318),socket:(…,…)) at /home/oper/lib/swipl/boot/init.pl:562
?- set_prolog_flag(encoding, utf8).
true.

I think I see what is going on. To be sure though, what is your operating system? What is your current language (On POSIX systems, the output of locale)?