Link to home
Start Free TrialLog in
Avatar of DennisPost
DennisPostFlag for Netherlands

asked on

VB6 Multi language input (Czech, Hungerian, English, French.....)

Hi,

I have a visual basic 6 application that will be used in The Netherlands (Already running 3 years), Belgium and the Czech Republic. Backend = MS SQL 2000 (SP4).

Here in the netherlands we just type everything in english or dutch and store it under collation:
SQL_Latin1_General_CP1_CI_AS
I plan to use this in Belgium as well.

For Czech I will use.
SQL_Czech_CP1250_CI_AS

A lot of my visual basic 6 code points to KeyAscii this and Keyascii that.
Will this be a problem with the Czech language?
If so, how can I make sure the Czech users can enter things in their own language?
Any pointers on how to best handle different regional settings?

Thanks
Avatar of DarkoLord
DarkoLord
Flag of Slovenia image

Hi,

There shouldn't be any problems at all.
You might only encounter some problems when displaying the text on systems on which the "Language for non-unicode programs" setting in Regional Settings is not set to the language you are displaying, however usually this is already set to the correct one when installing Windows...

Regards,
Darko
Avatar of DennisPost

ASKER

Mr DarokLord,

I have setup the czech collation on one table only and asked them to enter all their characters.
I'll post again when I know how the test went.

Cheers

Hi,

The test didn't go very well.

I have look around a bit more and found out that I will have to use unicode controls.
There are some applications out there that I can buy. (800 - 4000 usd !!!!).
http://www.freevbcode.com/ShowCode.Asp?ID=3591
http://www.vbforums.com/archive/index.php/t-365738.html
http://support.microsoft.com/default.aspx?scid=kb;en-us;224305

I guess I'll have to do a bit of experimenting to get this working. (Probably a lot of rewriting as well :-(   )
Hi,

which controls are you using? Czech characters should display properly in ordinary controls if the "Language for non-unicode programs" is set to Czech in Regional Settings
Hi,
Nope, they do not display properly.
Did you check out the links?
Yes, I did. I know the Forms 2.0 "trick", however you cannot redistribute the Form 2.0 DLL with your application (because of the licence).

It's strange that it doesn't work as those (Czech, for example) characters are NOT unicode
My code has things like Keyascii this and keyascii that all over the place.
I don't think Czech characters are in the ascii range.
If it's not unicode, then what is it?

I read somewhere that the form 2 .dll is available for free download because of the langauge compatiblity issues in VB6.
I have created a test application that cycles through all unicode characters and displays all characters between a decimal range. It also returns the keyascii values for each keypress to a combo box.
(Combining these 2 articles http://www.freevbcode.com/ShowCode.Asp?ID=3591 and
http://www.freevbcode.com/ShowCode.asp?ID=3278)

I am using CZ language with Czech standard keyboard though my regional settings are still set to Dutch Netherlands. (Setting it to Czech makes no difference)

When i type in the unicode text box iget this:
+ìšèøžýáíé§ù

instead of this: (Typed directly in this textbox)
+aY~ýáíé´§o

The third character has a decimal value of 154. Both tools in my test app return different values.
One gives a bold | and the other a small box.

Any idea whats going on?
Oops

>>instead of this: (Typed directly in this textbox)
+aY~ýáíé´§o

these are also the wrong characters. They were displayed correctly when typing them.... :-(
ASKER CERTIFIED SOLUTION
Avatar of DarkoLord
DarkoLord
Flag of Slovenia 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
Is there a list of unicode languages out there?
http://unicode.org/onlinedat/languages.html 

Your trick helped things a lot, i see all the characters as they should be.
but....
The information isn't being saved correctly. Atleast 4 of the characters are missing their accents.
The SQL 2000 server column I am using for the test:
nVarchar (80)
SQL_Czech_CP1250_CI_AS

The application will also have to support russian, german, hungerian. But lets stick with Czech voor this question.

Thanks for the help thus far.
Try the Czech_CI_AS collation instead
Nope, didn't help.
Any other idea's?
I altered all the regional setting on my server in Czech to Czech including default non-unicode language.
I can type but cannot save 4 letters still.
I have been trying different collations without success.

Good anymore tricks?
Just to let you know which letters I am missing look at this link:
http://www.science.co.il/Language/Character-Code.asp?s=1250

Decimals: 200, 204, 216 & 217
You have answered my question, but I still need help on the server side.
Here is my continuation question.

https://www.experts-exchange.com/questions/22848470/Czech-letters-missing-SQL-Windows-collation.html

Thanks for the help !!