Link to home
Start Free TrialLog in
Avatar of dekeyzer
dekeyzerFlag for Belgium

asked on

How I make a russian version of my vb program

Hello,

I have a program that works well in Dutch, English and French. I have a translation table (with fielddef nvarchar) with all the words on a SQLServer. When I retrieve a record with the russian text I have all ?????? instead of the russian text that is in my SQLServer.
I tried the SQL language on russian but the problem still exists.
I work on a Win2000 Dutch Windows version.

Can someone give me a hint how i can proceed ?

Thanks.
Avatar of sbereli
sbereli

Try to keep a unicode in the transtation table. It may be beneficial for any other language.

Hope it helps.
Dobry Den
Watch out for languages that use double-byute characters sets.
Do you intend your program to be run on Russian Windows?


Do Svidania
Avatar of dekeyzer

ASKER

Yes, my program has to run on a russian windows.
It is written in Visual Basic 6.0 SP5.
Meanwhile I tried my program on a russian windows and there all the characters are correct.

But is there any other way to make visual basic to understand all languages on a single language windows computer ?
The code thas you writed for greek is very good.
Can you help me on the charset for Russian ?
Is the hex-extension the same for russian ?

Which font do you want to use?
For the moment I use 'MS Sans Serif' but Arial is fine for me.
I have found a font 'Arial Unicode MS standaard' but I d'ont have a 'Arial Russian' font.

Thanks.
You are going to have to get a font which has cyrilic characters.  'MS Sans Serif' and Arial do not have them.
With the font 'MS Sans Serif' i have cyrilic charcaters on a russian windows.
Also i recieved some fonts from russia but the are also called 'Arial'.
Is the font 'Arial Unicode MS standaard' not capable for all the characters ?
Ok, take a look at this to start.  I am going to get a cup of java juice and think a bit.

http://www.microsoft.com/typography/unicode/cscp.htm
http://www.microsoft.com/typography/unicode/1251.htm?fname=%20&fsize=
Ok lets try this.  Got to the font property of the label or textbox control and in the script property dropdown select Cyrillic.  Then try displaying Russian text.  Let me know what happens.
I tried your suggestion but it dont work :
- In visual basic I added a textbox
- With the standard fort 'MS Sans Serif' can I only chose 'Westers'
- With the font 'Arial' I can chose 'Cyrillisch'
- I load my record with the russian text en tried to show it (in the font arial, cyrillisch) but I have '???????' instead of the word.
Thats ok that it did not work.  For the Arial font with the Cyrillic now try to get the ASCII numbers for the '???????' characters
It's all 63.
I dont get it, in my databank everything is ok, on a russian windows also.
But when I read my adodb.recordset everthing is '?'
Can you please assign the string to a byte array and then get the ASCII values.  You need to get it before you place it in the control.  

    arrUnicode() = strString
    intLen = Len(strString)
    For intIndex = 0 To intLen
        debug.print arrUnicode(intIndex)
    next
I had a problem with the array. Instead I tried with AscB() with the following results:
16 - 64 - 66 - 56 - 58  - 67 - 59
What was the problem with the array?
Could copy paste the Russian string you are using into here like this: Èíñòðóêöèè
on the first line (arrUnicode() = strString) I have the error : Sub or function not defined.
If I add the following line : Dim arrUnicode(6) as string I have the error : Can't assign to array.
In the help from VB I saw the AscB (Asc maar Binair) and I have results.
Sorry, define it as

Dim arrUnicode() As Byte
russian : Àðòèêóë
english : Article
with the array-version I have :
 16
 4
 64
 4
 66
 4
 56
 4
How many letters in the Russian word?
7 letters.
The russian word was good when I put it in my browser.
Now on the site it is not good.
Ok, do the loop for twice the size of the string intLen

   For intIndex = 0 To intLen *2
        debug.print arrUnicode(intIndex)
   next
16 - 4 - 64 - 4 - 66 - 4 - 56 - 4 - 58 - 4 - 67 - 4 - 59 - 4
ASKER CERTIFIED SOLUTION
Avatar of leonstryker
leonstryker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I download the fonts an i tried your program but,
the result is not longer '????' but '@B8:C;'.
On the russian windows version i have the same results. Instead from the correct string I have '@B8:C;'.
When I modified your program and add &HB0 on every char then it works !!!
It works also with Arial and script property dropdown select Cyrillic.
:) I am glad it worked.  I now have 2 Languages thigured out.  Good luck with the rest of your app.

Leon