Перекодирование строки в CP 866 и обратно в WIN 1251 (API)По материалам : http://www.sql.ru/forum/ Public Declare PtrSafe Function OemToChar Lib "user32" Alias "OemToCharA" (ByVal StrFrom As String, ByVal StrTo As String) As Long Public Declare PtrSafe Function CharToOem Lib "user32" Alias "CharToOemA" (ByVal lpszSrc As String, ByVal lpszDst As String) As Long Public Function OEM2ANSI(ByVal sOem As String) As String Dim sAnsi As String sAnsi = String(Len(sOem), Chr(0)) OemToChar sOem, sAnsi OEM2ANSI = sAnsi End Function Public Function ANSI2OEM(ByVal sAnsi As String) As String Dim sOem As String sOem = String(Len(sAnsi), Chr(0)) CharToOem sAnsi, sOem ANSI2OEM = sOem End Function |
|||
L.E. 15.01.2020 |