首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VB >

为什么读日文时会有乱码?该怎么处理

2012-02-02 
为什么读日文时会有乱码?DimRevdstr()AsByteDimabcAsStringDimiAsIntegerDimnAsIntegerDimHstrAsString16D

为什么读日文时会有乱码?
Dim   Revdstr()   As   Byte
'         Dim   abc               As   String
        Dim   i                   As   Integer
        Dim   n                   As   Integer
        Dim   Hstr             As   String   '16
        Dim   DECstr             As   String   '10
        Dim   Data()     As   String

        Open   App.Path   &   "\ "   &   "HELP.MSG "   For   Binary   As   #2
                ReDim   Revdstr(LOF(2)   -   1)
                        Get   #2,   ,   Revdstr
'                         abc   =   StrConv(Revdstr,   vbUnicode)       '$$
        Close   #2

        For   i   =   0   To   UBound(Revdstr)
                Hstr   =   HEX(Revdstr(i))
                DECstr   =   DECstr   &   Chr(Revdstr(i))
'                 Debug.Print   Hstr         'tests
                If   Mid(Hstr,   1,   1)   =   0   Then
                        ReDim   Preserve   Data(n)   As   String
                        If   n   <   n   +   1   Then
                                Data(n)   =   Left(DECstr,   Len(DECstr))
                                Debug.Print   Data(n)   'tests
                                n   =   n   +   1
                                DECstr   =   " "
                        End   If
                End   If
        Next

[解决办法]
现在好用了么??
使用CONVSTR函数转换!

热点排行