Solved

Chinese characters into edit control

Posted on 2009-07-09
8
255 Views
Last Modified: 2013-12-26
Hi,
We are building a software for a company that deals with chinese people. the want a program is operated in English entirely, except one field. This field needs to store a name in chinese, using chinese symbols. We face the problem where once we enter some text using say Chinese Simplified, it looks fine up to the point when the control gets an <enter> . It's content here changes to "???" I assume this is due to the fact the the chinese symbols are stored as double-byte and this is the time when the conversion happens
We are using standard English version of Windows XP Pro
What are the choices ?

TIA,
Tom
0
Comment
Question by:tom_szabo
  • 4
  • 4
8 Comments
 
LVL 22

Expert Comment

by:danaseaman
Comment Utility
Try this Unicode TextBox. Uses UTF-16 strings (not DBCS) and will work on any OS, not just Chinese.

http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=70658&lngWId=1
or latest control from:
http://kontu.selfip.info/vb6/projects/Unicode/UniText/

0
 
LVL 22

Expert Comment

by:danaseaman
Comment Utility
This UTF-16 Chinese string can be used for testing:

   Dim sChs    As String
   
   sChs = "CHS: " & ChrW$(&H6B22) & ChrW$(&H8FCE)

0
 

Author Comment

by:tom_szabo
Comment Utility
Hi Danaseaman,
My only issue is that I am not using VB but Visual Object, so I would need the control to be an OCX. Does this have an OCX version that you know of, or is there any other that could be used?

TIA,

Tom
0
 
LVL 22

Expert Comment

by:danaseaman
Comment Utility
Compiled to UniTextBox.ocx.
You can download here:
http://download636.mediafire.com/nbnt02jzzudg/jmndmy0ym0n/UniTextMerri.zip


0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:tom_szabo
Comment Utility
Thanks for that, you have guided me to the right thing, but it doesn't want to work... I can actually get it to show in the form but when I click in it with the mouse, it quits the program without even a message
Ayway, that is not yor fault. Do you know any other OCX?  TIA, Tom
0
 
LVL 22

Accepted Solution

by:
danaseaman earned 500 total points
Comment Utility
If you have Office installed then you could try TextBox in "Forms 2.0 Object Library".
I assume you have installed Far East language support in XP:
http://www.cyberactivex.com/UnicodeTutorialVb.htm#Wheres_the_Beef_%28Unicode%29


0
 

Author Comment

by:tom_szabo
Comment Utility
I think you already done your work for the points so I will consider this as complete, will post a new question if this second option will not do me either, thanks again, Tom

I really appreciate your prompt answer!
0
 

Author Closing Comment

by:tom_szabo
Comment Utility
I really appreciate your prompt answer!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now