解决access数据库记录中含有日文时内存溢出的函数

Function EncodeJP(byval strContent)

 If strContent="" Then Exit Function

 'SQL版本不进行编码
 If IS_SQLDATA=1 Then
  EncodeJP=strContent
  Exit Function
 End If

 strContent=Replace(strContent,"ガ","ガ")
    strContent=Replace(strContent,"ギ","ギ")
    strContent=Replace(strContent,"グ","グ")
    strContent=Replace(strContent,"ア","ア")
    strContent=Replace(strContent,"ゲ","ゲ")
    strContent=Replace(strContent,"ゴ","ゴ")
    strContent=Replace(strContent,"ザ","ザ")
    strContent=Replace(strContent,"ジ","ジ")
    strContent=Replace(strContent,"ズ","ズ")
    strContent=Replace(strContent,"ゼ","ゼ")
    strContent=Replace(strContent,"ゾ","ゾ")
    strContent=Replace(strContent,"ダ","ダ")
    strContent=Replace(strContent,"ヂ","ヂ")
    strContent=Replace(strContent,"ヅ","ヅ")
    strContent=Replace(strContent,"デ","デ")
    strContent=Replace(strContent,"ド","ド")
    strContent=Replace(strContent,"バ","バ")
    strContent=Replace(strContent,"パ","パ")
    strContent=Replace(strContent,"ビ","ビ")
    strContent=Replace(strContent,"ピ","ピ")
    strContent=Replace(strContent,"ブ","ブ")
    strContent=Replace(strContent,"ブ","ブ")
    strContent=Replace(strContent,"プ","プ")
    strContent=Replace(strContent,"ベ","ベ")
    strContent=Replace(strContent,"ペ","ペ")
    strContent=Replace(strContent,"ボ","ボ")
    strContent=Replace(strContent,"ポ","ポ")
    strContent=Replace(strContent,"ヴ","ヴ")

    EncodeJP=strContent
End Function



上一篇: Fso操作大全
下一篇: Asp过滤脚本函数
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags: asp
相关日志:
评论: 0 | 引用: 0 | 查看次数: 3213
发表评论
昵 称:
密 码: 游客发言不需要密码.
邮 箱: 邮件地址支持Gravatar头像,邮箱地址不会公开.
网 址: 输入网址便于回访.
内 容:
验证码:
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 1000 字 | UBB代码 开启 | [img]标签 关闭

 广告位

↑返回顶部↑