Solved

Chinese characters into edit control

Posted on 2009-07-09
8
260 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
ID: 24815526
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
ID: 24816638
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
ID: 24833851
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
ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

 
LVL 22

Expert Comment

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


0
 

Author Comment

by:tom_szabo
ID: 24835260
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
ID: 24835322
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
ID: 24835412
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
ID: 31601544
I really appreciate your prompt answer!
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VBA color chart bars 12 86
String manipulation in Visual Basic 7 62
Macro: print each sheet to pdf using ExportAsFixedFormat 11 48
VBA/SQL - Connect to SQL server and pull data 4 110
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

809 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