| |

VerySource

 Forgot password?
 Register
Search
View: 1807|Reply: 11

text text box, how to display unicode character set

[Copy link]

4

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-2-1 16:20:01
| Show all posts |Read mode
There is an input box on the interface
Enter some characters, either GBK or unicode, and the unicode characters can be displayed correctly. However, use a word-making program (eudcedit.exe) on the unicode code points, such as f8f1. Word can be input and displayed correctly, and a question mark is displayed in the text box. How can I make the text box support unicode character set?

Which expert please tell me
Thank you
Reply

Use magic Report

0

Threads

46

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-3-16 13:00:02
| Show all posts
The TextBox that comes with VB is not possible.
Reply

Use magic Report

0

Threads

6

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 Malaysia

Post time: 2020-4-28 20:30:01
| Show all posts
Owner-drawn Textbox using CreateWindowExW can show Unicode on NT / XP.VB default Textbox can't do the job.You can use RichEdit to show unicode.
Reply

Use magic Report

4

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-6-6 14:00:02
| Show all posts
RichEdit control
It can be entered into it, but it is entered manually
, If it is read by a program, the string becomes a question mark, how can I solve it?
Reply

Use magic Report

0

Threads

6

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 Malaysia

Post time: 2020-8-17 22:45:01
| Show all posts
1. The latest research:
   The TextBox that comes with VB can fully display Unicode. The Label control is also available. But it cannot display Unicode with two different code pages at the same time, for example: Arabic and Chinese. Except for English, which means that it can display Unicode with a mixture of Chinese and English. It can also display Arabic and English mixed Unicode. What you need to do is not only convert the Unicode string to MBCS, but also set the Font.CharSet and font of the TextBox. For example: Unicode String with mixed Chinese and English:
        Text1.Font.Name = "Tohoma"
        Text1.Font.charset = 134'--->GB2312 CharSet is 134
        Text1.Text=MBCS_Encode(strUnicode,936) '936 is the code page of GB2312
MBCS_Encode uses WideCharToMultiByte(936, lFlags, StrPtr(strUnicode), _
      TLen, b(0), lngBufferSize, vbNullString, 0)

2. In order to completely solve the Unicode display and editing problems, you can use CreateWindowsW to draw your own TextBox, which is to extend the TextBox function.
Reply

Use magic Report

0

Threads

6

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 Malaysia

Post time: 2020-8-17 23:30:02
| Show all posts
Connected to the TextBox that comes with VB, Label can fully display Unicode:
  Tested on English Windows 98 and English XP. In this way, your program can go abroad without fear of garbled codes.
Reply

Use magic Report

4

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-8-18 00:30:01
| Show all posts
Can the character created by the unicode code point of f8e1 be displayed correctly?
Reply

Use magic Report

4

Threads

15

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

 Author| Post time: 2020-8-18 08:45:02
| Show all posts
Has anyone succeeded?
Reply

Use magic Report

0

Threads

6

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 Netherlands

Post time: 2020-8-18 09:00:01
| Show all posts
After reading your post for many days, I haven't solved it yet, so I tried it. Yes, you can see it in both Textbox and RichEdit. The problem may be that you did not use eudcedit.exe correctly, first select F8E1--> and then draw-->Save Character--->Font Links to link with all Font. Test environment: XP (English)/SP2,VB6 (En ) SP6.
Reply

Use magic Report

0

Threads

6

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 Malaysia

Post time: 2020-8-18 09:15:01
| Show all posts
Because the characters you make are in your own computer, they can only be displayed locally.
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