2 # -*- coding: koi8-r -*-
4 from __future__ import print_function
5 from ..lazy.dict import LazyDictInitFunc
8 # Lat -> Rus translation
89 def make_lat2xxx(encoding="cp1251"):
91 for k, v in lat2koi_d.items():
96 lat2win_d = LazyDictInitFunc(make_lat2xxx, encoding="cp1251")
99 def lat2rus(instr, lat2rus_d = lat2koi_d):
102 c = lat2rus_d.get(c, c)
110 return lat2rus(instr, lat2win_d)
113 if __name__ == "__main__":
114 Test = "Ghbdtn nt,t^ ghtrhfcysq vbh!"
116 print("Тест:", lat2koi(Test))