- Код: Выделить всё
Groups = Split(XmlHttp.GetResponseHeader("Content-type"),";")
For Each Group in Groups
Group = Split(Group,"=")
if Ubound(Group)=1 Then
Group(0) = Trim(LCase(Group(0)))
if Group(0)="charset" then Charset = Trim(Group(1))
Exit For
End if
Next
А конвертнуть через
- Код: Выделить всё
Private Function BytesToText(ByteData,Charset)
if IsEmpty(ByteData) Then Exit Function
With Stream
.Type = adTypeBinary
.Open
.Write ByteData
.Position = 0
.Type = adTypeText
if Charset <> "" Then .Charset = Charset
BytesToText = Stream.ReadText
.Close
End With
End Function