当前位置: 网学 > 编程文档 > VB > 正文

用VB实现一个简单的ESMTP客户端

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/16
下载{$ArticleTitle}原创论文样式
;   c4 = base64DecodeChars(c4)
            End If
        Loop While (i < len1 And c4 = -1)
        If (c4 = -1) Then
            base64decode = out
            Exit Function
        End If

        out = out + Chr(((c3 And 3) * 64) Or c4)
    Wend
    
    base64decode = out
End Function

Function utf16to8(str As String) As String


    Dim out, i, len1, c
    out = ""
    len1 = Len(str)
    For i = 1 To len1
        c = Asc(Mid(str, i, 1))
        If ((c >= 1) And (c <= 127)) Then
            out = out + Mid(str, i, 1)
        ElseIf (c > 2047) Then
            out = out + Chr(224 Or ((c \ 4096) And 15))
            out = out + Chr(128 Or ((c \ 64) And 63))
            out = out + Chr(128 Or (c And 63))
        Else
            out = out + Chr(192 Or ((c \ 64) And 31))
            out = out + Chr(128 Or (c And 63))
        End If
    Next
    utf16to8 = out
End Function

Function utf8to16(str As String) As String


    Dim out, i, len1, c
    Dim char2, char3

    out = ""
    len1 = Len(str)
    i = 0
    While (i < len1)
        c = Asc(Mid(str, i + 1, 1))
        i = i + 1
        Select Case (c \ 16)
    
        Case 0 To 7
            out = out + Mid(str, i, 1)
        
        Case 12, 13
            char2 = Asc(Mid(str, i + 1, 1))
            i = i + 1
            out = out
  • 下一篇资讯: VB与数据连接的心得
  • 网学推荐

    免费论文

    原创论文

    浏览:
    设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
    版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
    湘ICP备09003080号