?
Solved

Display Unicode characters in Rich Text Box

Posted on 2003-03-26
5
Medium Priority
?
711 Views
Last Modified: 2013-12-26
Working with Visual Basic 6.0

I need to display Unicode characters (i.e. chrW(601)) in a Rich Text Box control. I load the characters from an SQLServer database through an RDO Resultset:

   Dim Info As rdoResultset
   Dim aux As String
   ...
   aux = Info.rdoColumns("article")
   RichTextBox1.Text = aux

When I ask for the value of aux it is OK (i.e. AscW(Mid(aux,1,1)) = 601). But then the value of the same position of RichTextBox1.Text is no longer 601 but 63, and a "?" is displayed.

I guess Rich Text Box does not support Unicode, but then what control can I use? Or is there any trick to make it work?

Thanks

gloria


0
Comment
Question by:pcalabruix
  • 2
  • 2
5 Comments
 
LVL 5

Expert Comment

by:Rhaedes
ID: 8249042
The RTB does support Unicode, so your error is elsewhere. Have you set the RTB font to Unicode?

Kindest regards,
Rhaedes

(PD Ets catalana?)
0
 

Author Comment

by:pcalabruix
ID: 8253753
I use the property SelFontName to set the font, and I have set it to a Unicode font, yes. The strange thing is that some characters are displayed, while others are not. The font supports all characters.
I've observed that when I choose the font at design time there is a possibility to choose among different Alfabetos (Charsets?): Occidental, Griego, Turco, Europa Central, but none of the 4 possibilities is the one I need (I have to display phonetic characters). UNICODE is not among the choices. Can I set this property programmatically?? How??

Thanks a lot if you can help me!!!

(PD. Sí, soc catalana, I tu?)
0
 
LVL 5

Accepted Solution

by:
Rhaedes earned 300 total points
ID: 8256634
The problem is that the IPA symbols are scattered throughout the Unicode, and you can only use one block of the complete character set at a time (using RichTextBox1.Font.Charset="Whatever"). If I were you, I would save myself a lot of heartache and download an ascii-mapped IPA font (for example ipaascii from http://www.ling.mq.edu.au/units/ling210-901/help/fonts/obtaining_fonts.html ).
Another approach is to use a webbrowser.

Kindest regards,
Rhaedes

Anyone who reads this please ignore the idle Catalan chatter below: we're just saying hello!

Doncs sóc anglés, però fa cosa de set o huit anys que visc al País Valencià. És que m'ha cridat l'atenció el teu malnom de 'pcalabruix' - i per açò t'he preguntat si eres catalana. Una abraçadeta,
Rhaedes
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 9053488
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in a week or two.  I would appreciate any comments by the experts that would help me in making a recommendation.

It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:
http://www.experts-exchange.com/help/closing.jsp

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 9116331
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

 -->Accept Rhaedes's comment as Answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER

GPrentice00
Cleanup Volunteer
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…
Suggested Courses

621 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