Комрады, помогатие плз. Не знаю на правильном ли форуме написал. Какая-то ерунда с кодировкой уже весь мозг сломал. Не отображается корректно и всё тут... Код (Text): <% @CodePage=65001 %> <% OPTION EXPLICIT Response.Buffer = True Response.Expires = 0 Response.Charset = "utf-8" Response.ContentType = "text/html" Server.ScriptTimeout = 1000 %> <!--#include file="common.inc.asp"--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"/> <title>Интернет-приемная мэрии НСО</title> </head> <body> <% Dim Email, SourceData, FormFields, Source Dim Field, FieldName, FieldContents SourceData = "person=0JDQtNC80LjQvdC40YHRgtGA0LDRhtC40Y8g0JvQtdC90LjQvdGB0LrQvtCz0L4g0YAt0L3QsA%3D%3D&hidden_person=dmVnYXJ1bGV6QG5ncy5ydQ%3D%3D&family=0KPQo9Cj&name=0JrQmtCa&patronymic=0JXQldCV&scope=0JDRgdC%2F0LjRgNCw0L3RgtGL&hidden_scope=&novosib_check=b24%3D&phone=MTIzNDU2Nzg5&district=0JfQsNC10LvRjNGG0L7QstGB0LrQuNC5&hidden_district=&ZIP_code=&street=0JrQo9Ca0KPQmtCj&house=Nzg%3D&building=&flat=&email=&content=0KbQo9Ca0JXQoA%3D%3D" Source=SourceData SourceData = split(SourceData, "&") For Each Field In SourceData Field = split(Field, "=") FieldName = URLDecode(Field(0)) if Trim(URLDecode(Field(1)))<>"" then FieldContents =DecodeUTF8(Base64Decode(URLDecode(Field(1)))) Response.Write FieldContents&"</br>" end if FormFields = FormFields & FieldName & "=" & FieldContents & chr(13) & chr(10) Next %> </body> </html> и сообственно файл перекодировки Код (Text): <% ' Simple functions to convert the first 256 characters ' of the Windows character set from and to UTF-8. ' Written by Hans Kalle for Fisz ' http://www.fisz.nl 'IsValidUTF8 ' Tells if the string is valid UTF-8 encoded 'Returns: ' true (valid UTF-8) ' false (invalid UTF-8 or not UTF-8 encoded string) function IsValidUTF8(s) dim i dim c dim n IsValidUTF8 = false i = 1 do while i <= len(s) c = asc(mid(s,i,1)) if c and &H80 then n = 1 do while i + n < len(s) if (asc(mid(s,i+n,1)) and &HC0) <> &H80 then exit do end if n = n + 1 loop select case n case 1 exit function case 2 if (c and &HE0) <> &HC0 then exit function end if case 3 if (c and &HF0) <> &HE0 then exit function end if case 4 if (c and &HF8) <> &HF0 then exit function end if case else exit function end select i = i + n else i = i + 1 end if loop IsValidUTF8 = true end function 'DecodeUTF8 ' Decodes a UTF-8 string to the Windows character set ' Non-convertable characters are replace by an upside ' down question mark. 'Returns: ' A Windows string function DecodeUTF8(s) dim i dim c dim n i = 1 do while i <= len(s) c = asc(mid(s,i,1)) if c and &H80 then n = 1 do while i + n < len(s) if (asc(mid(s,i+n,1)) and &HC0) <> &H80 then exit do end if n = n + 1 loop if n = 2 and ((c and &HE0) = &HC0) then c = asc(mid(s,i+1,1)) + &H40 * (c and &H01) else c = 191 end if s = left(s,i-1) + chr(c) + mid(s,i+n) end if i = i + 1 loop DecodeUTF8 = s end function 'EncodeUTF8 ' Encodes a Windows string in UTF-8 'Returns: ' A UTF-8 encoded string function EncodeUTF8(s) dim i dim c i = 1 do while i <= len(s) c = asc(mid(s,i,1)) if c >= &H80 then s = left(s,i-1) + chr(&HC2 + ((c and &H40) / &H40)) + chr(c and &HBF) + mid(s,i+1) i = i + 1 end if i = i + 1 loop EncodeUTF8 = s end function ' Decodes a base-64 encoded string (BSTR type). ' 1999 - 2004 Antonin Foller, http://www.motobit.com ' 1.01 - solves problem with Access And 'Compare Database' (InStr) Function Base64Decode(ByVal base64String) 'rfc1521 '1999 Antonin Foller, Motobit Software, http://Motobit.cz Const Base64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" Dim dataLength, sOut, groupBegin 'remove white spaces, If any base64String = Replace(base64String, vbCrLf, "") base64String = Replace(base64String, vbTab, "") base64String = Replace(base64String, " ", "") 'The source must consists from groups with Len of 4 chars dataLength = Len(base64String) If dataLength Mod 4 <> 0 Then Err.Raise 1, "Base64Decode", "Bad Base64 string." Exit Function End If ' Now decode each group: For groupBegin = 1 To dataLength Step 4 Dim numDataBytes, CharCounter, thisChar, thisData, nGroup, pOut ' Each data group encodes up To 3 actual bytes. numDataBytes = 3 nGroup = 0 For CharCounter = 0 To 3 ' Convert each character into 6 bits of data, And add it To ' an integer For temporary storage. If a character is a '=', there ' is one fewer data byte. (There can only be a maximum of 2 '=' In ' the whole string.) thisChar = Mid(base64String, groupBegin + CharCounter, 1) If thisChar = "=" Then numDataBytes = numDataBytes - 1 thisData = 0 Else thisData = InStr(1, Base64, thisChar, vbBinaryCompare) - 1 End If If thisData = -1 Then Err.Raise 2, "Base64Decode", "Bad character In Base64 string." Exit Function End If nGroup = 64 * nGroup + thisData Next 'Hex splits the long To 6 groups with 4 bits nGroup = Hex(nGroup) 'Add leading zeros nGroup = String(6 - Len(nGroup), "0") & nGroup 'Convert the 3 byte hex integer (6 chars) To 3 characters pOut = Chr(CByte("&H" & Mid(nGroup, 1, 2))) + _ Chr(CByte("&H" & Mid(nGroup, 3, 2))) + _ Chr(CByte("&H" & Mid(nGroup, 5, 2))) 'add numDataBytes characters To out string sOut = sOut & Left(pOut, numDataBytes) Next Base64Decode = sOut End Function %>