?
Solved

Display Unicode characters in Rich Text Box

Posted on 2003-03-26
5
Medium Priority
?
667 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Suggested Courses

752 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