Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> The Rtf Textbox Control, And Asian Characters, If someone could shed some light...
Paradox
post Mar 7 2005, 07:35 AM
Post #1


Newbie [Level 2]
**

Group: Members
Posts: 35
Joined: 7-March 05
From: New Zealand
Member No.: 4,216



I'm currently working on a project for school. I have to make a program for a client, and my client is the head of the Japanese Dept.

I have run into a small problem however...

After finally managing to work out a way to actually get VB to display Asian characters, using the .textRTF property of the richtextbox control. But, in doing this, it turns it into something like this...

CODE
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\froman\fprq1\fcharset128 MS UI Gothic;}{\f1\fnil\fcharset0 MS Sans Serif;}}
\viewkind4\uc1\pard\lang1041\f0\fs17\'93\'fa\'96\'7b\'8c\'ea\lang5129\f1
\par}


Needless to say, this creates a slight difficulty for checking the input of the user against a stored value, i.e showing the user a word and getting them to write it in japanese.

So far, this hasn't been an issue, but in response to testing results, I had to increase the font size of the displayed characters. Of course, this affected the programs ability to compare both values, as one is now different to the other.

How can I get around this? Any help would be appreciated.
Go to the top of the page
 
+Quote Post
eiteljoh
post Mar 7 2005, 11:02 AM
Post #2


Advanced Member
*******

Group: Members
Posts: 101
Joined: 3-December 04
Member No.: 2,521



not sure in vb, but have delt with these problems before. if you are comparing the values, i'd suggest either checking their hex or unicode values against eachother.

the real problem with japanese is shift-jis is not a "standard", it's more of a thing. IBM/Microsoft, etc, have their own shift-jis codepages. so it makes this stuff really difficult, because who's codepage do you load?

sorry, but you're in a whole heap of trouble ohmy.gif)
Go to the top of the page
 
+Quote Post
vizskywalker
post Mar 9 2005, 03:46 AM
Post #3


Member [Level 2]
*****

Group: Members
Posts: 79
Joined: 12-January 05
Member No.: 3,251



You could simply download a Japanese font and use that. I found a site with unicode Japanese fonts, many of which are TTF format, so hopefully they will help. I'm only guessing here because I haven't tested any of this, but the unicode font ought to allow you to check unicode values for different characters.
Go to the top of the page
 
+Quote Post
vizskywalker
post Mar 9 2005, 03:47 AM
Post #4


Member [Level 2]
*****

Group: Members
Posts: 79
Joined: 12-January 05
Member No.: 3,251



Whoops, forgot the link to the unicode font site, here: http://www.travelphrases.info/gallery/Fonts_Japanese.html.
Go to the top of the page
 
+Quote Post
Paradox
post Mar 9 2005, 06:14 AM
Post #5


Newbie [Level 2]
**

Group: Members
Posts: 35
Joined: 7-March 05
From: New Zealand
Member No.: 4,216



Thanks man, that looks like it's going to work.

The main issue was because the two richtext boxes were of a different font format (i.e centred, a few sizes larger...) but now, it appears that neither of these will matter, as I should be able to just compare the straight .Text properties.

Thanks again. biggrin.gif
Go to the top of the page
 
+Quote Post
vizskywalker
post Mar 9 2005, 04:26 PM
Post #6


Member [Level 2]
*****

Group: Members
Posts: 79
Joined: 12-January 05
Member No.: 3,251



You're welcome, and let us know if it does work. If not I'll try to find something else for you. But when dealing with a text problem, I always check the fonts first, it is so frequently a problem that having sites with good fonts is worthwhile.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics


 



- Lo-Fi Version Time is now: 5th September 2008 - 12:16 PM