| |

VerySource

 Forgot password?
 Register
Search
View: 863|Reply: 6

Why is there garbled characters when reading Japanese?

[Copy link]

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-2-15 05:00:01
| Show all posts |Read mode
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
Reply

Use magic Report

0

Threads

10

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-4-17 07:30:01
| Show all posts
It's not your fault, it's the system's fault.
Japanese and Chinese encoding methods are the same.
It's just that the controls you use to display Japanese do not support multiple languages.
I believe it can be displayed normally under the Japanese system (it is estimated that the Chinese will become garbled)
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-4-17 23:30:01
| Show all posts
wdh840822:)
I already did it in Japanese, but it still became garbled when it was Japanese
what happened? ^ _ ^
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-4-28 05:30:01
| Show all posts
555, does anyone know how to fix the code, it won't work for a long time, the little girl please "prawn" ^ _ ^
Reply

Use magic Report

0

Threads

4

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-4-28 13:45:01
| Show all posts
Save as unicode file
Reply

Use magic Report

1

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

 Author| Post time: 2020-4-29 14:00:01
| Show all posts
rr091289:)
According to your method, it is still not feasible to save the file as UNICODE. I do n’t know why ..
And in principle, files cannot be changed, only through code changes
Is there any other way ^ _ ^
Reply

Use magic Report

0

Threads

18

Posts

12.00

Credits

Newbie

Rank: 1

Credits
12.00

 China

Post time: 2020-5-8 23:45:01
| Show all posts
Is it easy to use now?
   Use the CONVSTR function to convert!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list