could any one show me how i can display farsi unicode letters in visual basic textbox. Now when i paste i get all ????????????????? instead of the sentence. Thanks
rjoubert
The article you refer to is talking about VB.NET - this question relates to VB6
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?' Drive a Steam Roller
I set text box font to Arial, script Cyrilic. Then, from the language bar on my monitor, I selected "RU" (stands for Russian), and in VB code I typed some russian text. In VB code, the text looked encripted but when I ran the code, it indeed displayed the text in Russian correctly.
I guess it might be worth pointing out that the Forms 2.0 controls that are used by VBA are Unicode-aware, so you could always use them (but see posts passim in this forum about the restrictions on redistribution, and how to legally deal with those restrictions)
The thing I stress out is the possibility to implement the "language aware" textboxes in VB6 without resorting to non-standard or any non VB6 textboxes. I believe, this is what rammi07 is looking for. Your initial response might make think that this is impossible. But your information as always is very usefull.
Firstly, the OP specifically requested information on Farsi Unicode characters.
Secondly, the code page solution for supporting Arabic (CP 1256, which I believe requires that you install the Arabic language pack) does not actually have all the necessary characters for Farsi, so a proper Farsi solution requires Unicode
I don't have Farsi fonts and not an expert in Farsi like you... So I took other foreign language... I am not sure that Farsi is Arabic. Are you sure? Is it Iranian family language or not? I have an impression that this is rather Indo-European language, from Central Asian and Caspian regions.
Well, this is purely stuff that I found interesting that relates in some way to the problem at hand. I didn't mean to suggest that the reading represented any solution. The second article does point out that the Farsi alphabet isn't quite the same as the Arabic, having 32 characters rather than 28. The other ones have to do with others' attempts to analyze the problem or problems related in some way.
Fair enough, but those are mostly old articles. Arabic (and Farsi) support (via Unicode) is well established on the 32-bit Windows platforms. Just point your browser at say
to see right-to-left Farsi rendered quite happily by your browser. Copy and paste some into Notepad or Word. Still should be OK.
But try and paste it into VB, and you'll get question marks simply because the controls do not support Unicode output - NOT because VB does not support Unicode or Arabic
Aha, yes I see your point. A random string from the joomla page renders quite happily, as you say, here, even reversing the arrow keys when you move the cursor in the string:
???? ????? ??? ???? ????? ?????? ?? ??? ??????? ?? ???? ?? ? ?????? ????? ??? ?? ??? ?? ????? ??
For the record, it also does so in word and wordpad, although not in notepad--just the little rectangles there. Also, just as you say, pasting into a text box just does question marks.
Hmm....works in wordpad...rich text...hmm...well, I tried pasting a string into a RichTextBox control on a VB form, and lo and behold, it works fine! So perhaps rammi07 can use that instead of a text box.
Hmm...well, it worked when I first pasted it into the edit box, and it worked when I previewed it, but now it doesn't work. Interesting. However, the rich textbox still works.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.