ник: osmor
Да работает все. Поправил вашу функцию
если второй параметр True - то в латиницу, если False то в кирилицу
правила взял от сюда
http://gsnti-norms.ru/norms/common/doc.asp?2&/norms/stands/7_79.htm
потому что, как вам верно сказали на SQL.ru нужны одинаковые правила, или как говорят военные "Пусть безобразно, зато единообразно"
Function Transliteration(sWord, blnToLat)
Dim n, s, z
Transliteration = Trim(sWord & "")
If Transliteration = "" Then Exit Function
'If sLangCode <> Session("CurFromLanguage") Then Exit Function ' ?? ?????????
'If Session("CurFromLanguage") = Session("CurToLanguage") Then Exit Function ' ?????????
Dim aRL(32, 1) ' ????????? - ????????
If blnToLat Then
aRL(0, 0) = "а": aRL(0, 1) = "a"
aRL(1, 0) = "б": aRL(1, 1) = "b"
aRL(2, 0) = "в": aRL(2, 1) = "v"
aRL(3, 0) = "г": aRL(3, 1) = "g"
aRL(4, 0) = "д": aRL(4, 1) = "d"
aRL(5, 0) = "е": aRL(5, 1) = "e"
aRL(6, 0) = "ё": aRL(6, 1) = "yo"
aRL(7, 0) = "ж": aRL(7, 1) = "zh"
aRL(8, 0) = "з": aRL(8, 1) = "z"
aRL(9, 0) = "и": aRL(9, 1) = "i"
aRL(10, 0) = "й": aRL(10, 1) = "j"
aRL(11, 0) = "к": aRL(11, 1) = "k"
aRL(12, 0) = "л": aRL(12, 1) = "l"
aRL(13, 0) = "м": aRL(13, 1) = "m"
aRL(14, 0) = "н": aRL(14, 1) = "n"
aRL(15, 0) = "о": aRL(15, 1) = "o"
aRL(16, 0) = "п": aRL(16, 1) = "p"
aRL(17, 0) = "р": aRL(17, 1) = "r"
aRL(18, 0) = "с": aRL(18, 1) = "s"
aRL(19, 0) = "т": aRL(19, 1) = "t"
aRL(20, 0) = "у": aRL(20, 1) = "u"
aRL(21, 0) = "ф": aRL(21, 1) = "f"
aRL(22, 0) = "х": aRL(22, 1) = "x"
aRL(23, 0) = "ц": aRL(23, 1) = "c"
aRL(24, 0) = "ч": aRL(24, 1) = "ch"
aRL(25, 0) = "ш": aRL(25, 1) = "sh"
aRL(26, 0) = "щ": aRL(26, 1) = "shh"
aRL(27, 0) = "ь": aRL(27, 1) = "'"
aRL(28, 0) = "ы": aRL(28, 1) = "y"
aRL(29, 0) = "ъ": aRL(29, 1) = "''"
aRL(30, 0) = "э": aRL(30, 1) = "e'"
aRL(31, 0) = "ю": aRL(31, 1) = "yu"
aRL(32, 0) = "я": aRL(32, 1) = "ya"
Else
aRL(0, 0) = "shh": aRL(0, 1) = "щ"
aRL(1, 0) = "ch": aRL(1, 1) = "ч"
aRL(2, 0) = "sh": aRL(2, 1) = "ш"
aRL(3, 0) = "yo": aRL(3, 1) = "ё"
aRL(4, 0) = "zh": aRL(4, 1) = "ж"
aRL(5, 0) = "''": aRL(5, 1) = "ъ"
aRL(6, 0) = "e'": aRL(6, 1) = "э"
aRL(7, 0) = "yu": aRL(7, 1) = "ю"
aRL(8, 0) = "ya": aRL(8, 1) = "я"
aRL(9, 0) = "a": aRL(9, 1) = "а"
aRL(10, 0) = "b": aRL(10, 1) = "б"
aRL(11, 0) = "v": aRL(11, 1) = "в"
aRL(12, 0) = "g": aRL(12, 1) = "г"
aRL(13, 0) = "d": aRL(13, 1) = "д"
aRL(14, 0) = "e": aRL(14, 1) = "е"
aRL(15, 0) = "z": aRL(15, 1) = "з"
aRL(16, 0) = "i": aRL(16, 1) = "и"
aRL(17, 0) = "j": aRL(17, 1) = "й"
aRL(18, 0) = "k": aRL(18, 1) = "к"
aRL(19, 0) = "l": aRL(19, 1) = "л"
aRL(20, 0) = "m": aRL(20, 1) = "м"
aRL(21, 0) = "n": aRL(21, 1) = "н"
aRL(22, 0) = "o": aRL(22, 1) = "о"
aRL(23, 0) = "p": aRL(23, 1) = "п"
aRL(24, 0) = "r": aRL(24, 1) = "р"
aRL(25, 0) = "s": aRL(25, 1) = "с"
aRL(26, 0) = "t": aRL(26, 1) = "т"
aRL(27, 0) = "u": aRL(27, 1) = "у"
aRL(28, 0) = "f": aRL(28, 1) = "ф"
aRL(29, 0) = "x": aRL(29, 1) = "х"
aRL(30, 0) = "c": aRL(30, 1) = "ц"
aRL(31, 0) = "'": aRL(31, 1) = "ь"
aRL(32, 0) = "y": aRL(32, 1) = "ы"
End If
For n = 0 To 32
s = aRL(n, 0)
z = aRL(n, 1)
Transliteration = Replace(Transliteration, s, z)
Transliteration = Replace(Transliteration, UCase(s), UCase(z))
Next
End Function