VB Form showing indian and chinese characters

Hi,

I am using VB 6.5 integrating with other systems.
Recently they have passed me a string into the VB form to display english chinese and indain characters.

But the form only shows english letters for chinese and indian it shows ??? instead of the actual characters. How can I make the characters display on the form?

*PS: i am working on xp os, vb script.
csharp_learnerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Cenjoy100Commented:
0
Cenjoy100Commented:
Its must be because an encoding issue.
0
judgekingCommented:
csharp, still interested in this question?

Can you view indian chars in Notepad on your dev PC?
0
IT Pros Agree: AI and Machine Learning Key

We’d all like to think our company’s data is well protected, but when you ask IT professionals they admit the data probably is not as safe as it could be.

csharp_learnerAuthor Commented:
Sorry for the late reply,

No I can't indain or chinese chars in the PC.
0
judgekingCommented:
Try going to your Control Panel -> Regional and Language -> Languages.  Somewhere there should be an option to install new languages, or even a checkbox for 'Install files for complex scripts and right-to-left languages'.

More help here:
http://www.bharatdarshan.co.nz/hindi_font_downloads.html
0
csharp_learnerAuthor Commented:
Hi,

As attached the regional settings are already set but i still see distorted chars in the message box.

The code that was used to populate the form is as follow:

Public Sub ShowMsg(sCustomData As String)
  On Error Resume Next
  Dim sMessage As String

    strSplit = Split(sCustomData, ",")

    sMessage = strSplit(4)
 
    TISViewForm.ViewText.Text = sMessage
End Sub


Any help is appreciated...
regional1.PNG
regional2.PNG
regional.PNG
display.PNG
0
aikimarkCommented:
Unlike string variables, the controls on your form are not unicode compliant.  They're ASCII.  You need to look for a set of unicode controls for your form.

============
Question: Are you displaying this text in labels only or do you need to be able to capture user input in non-English character sets?

If you are only displaying this non-English text in labels, you might be able to work around this problem by replacing your label controls with picturebox controls.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
csharp_learnerAuthor Commented:
Thanks for your reply,

The string is passed to me by another user.
I don't understand what do you mean by "only displaying this non-English text in labels"
0
aikimarkCommented:
One way to implement localization is to change the text displayed in labels on your form and menu text.  The other (user input) controls would not change.  I wondered if your language changes would affect any controls other than labels.
0
csharp_learnerAuthor Commented:
sorry aikimark, I don't get what you mean.
can you explain it in more detail?

Thanks
0
aikimarkCommented:
Answer me this...What kinds of controls need to display these strings?
0
csharp_learnerAuthor Commented:
just a display form as attached in display.PNG
0
csharp_learnerAuthor Commented:
can anyone help?
0
Martin LissOlder than dirtCommented:
I've requested that this question be deleted for the following reason:

The question has either no comments or not enough useful information to be called an "answer".
0
aikimarkCommented:
@Martin

This is not an inactive question.  I am interrupting your close action.
0
aikimarkCommented:
@csharp_learner

>>can anyone help?
The experts have asked you questions and made suggestions.  You need to continue your participation in the problem-solution process
0
csharp_learnerAuthor Commented:
gladly, hoe can we move forward?
0
aikimarkCommented:
* reread the comments and answer any questions the experts have posted.
0
csharp_learnerAuthor Commented:
Hi aikimark,

This is the vb code i am using

Public Sub ShowMessage(DataComingIn As String)
  On Error Resume Next
  Dim sMessage As String
  Dim strSplit() As String

    strSplit = Split(DataComingIn, ",")
   
    sMessage = strSplit(4)

    DisplayForm.ViewText.Text = sMessage
   
    DisplayForm.Show

End Sub


The parameter "DataComingIn" is passed to me from an external source.(And from what i got to know today, it's in UTF-8 format). The string is supposed to contain all the 4 chracters of the 4 language inside. At the end of the code it will show a Form displaying the string passed by the parameter "DataComingIn".
form.PNG
0
aikimarkCommented:
So, you're trying to display different language characters in a single textbox at the same time?

Please do the following:
1. Convert your DataComingIn string into a byte array, using the StrConv() function
2. Iterate the values of the byte array
3. Post the byte values back here
0
csharp_learnerAuthor Commented:
Sorry for the late reply, as advised i have used the following codes and attached the resutls of the bytes.


    x = StrConv(sMessage, vbFromUnicode)
    For i = 0 To UBound(x)
    MsgBox x(i)
    Next
message.txt
0
aikimarkCommented:
This is a mixture of ASCII and unicode characters.  It appears to be space-delimited

v205 Default Message UNICODE Satu

Where UNICODE are the characters that you are having problems with.  Do you know anything about the desired rendering of the unicode characters in the program?  That is, how do you know whether you are receiving Indian or Chinese characters?
0
aikimarkCommented:
One more thing to note from my analysis: There are an odd number of bytes in the UNICODE string.

@csharp_learner

Do you have a screen shot of how this string should be rendered?
0
aikimarkCommented:
The byte array conversion might not show us the actual unicode.  Please paste the content of the Immediate Window after running this code snippet.
    For i = 0 To UBound(x)
    debug.print i, AscW(Mid$(sMessage, i,1))
    Next

Open in new window

0
csharp_learnerAuthor Commented:
This module have been put on hold by my boss hence development work is stopped.
Thanks for the help.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.