468,752 Members | 1,577 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,752 developers. It's quick & easy.

unicode characters to VB

hi
I am having problems getting unicode characters into VB. Using VB6 (sp3) and
Access 2000

Characters are displayed correctly in Access, just when I use ADODB (2.7) to
read them in VB i get ? character instead of unicode characters.

I will display them in TreeView (capable of Unicode)

Is there any patch, fix or something, I know this thing is going around
newsgroups for a long time just I didn't find any solution for it on the
web.

Thanks,
B
Nov 13 '05 #1
5 4588
On Wed, 17 Nov 2004 13:40:08 +0100, "Borko" <bo***@nospam.info> wrote:

It may be the font you are using. Try MsMincho or Arial Unicode.
Why use VB6SP3? The rest of the world is on SP6.
-Tom.

hi
I am having problems getting unicode characters into VB. Using VB6 (sp3) and
Access 2000

Characters are displayed correctly in Access, just when I use ADODB (2.7) to
read them in VB i get ? character instead of unicode characters.

I will display them in TreeView (capable of Unicode)

Is there any patch, fix or something, I know this thing is going around
newsgroups for a long time just I didn't find any solution for it on the
web.

Thanks,
B


Nov 13 '05 #2
same thing

"Tom van Stiphout" <no*************@cox.net> wrote in message
news:l5********************************@4ax.com...
On Wed, 17 Nov 2004 13:40:08 +0100, "Borko" <bo***@nospam.info> wrote:

It may be the font you are using. Try MsMincho or Arial Unicode.
Why use VB6SP3? The rest of the world is on SP6.
-Tom.

hi
I am having problems getting unicode characters into VB. Using VB6 (sp3)
and
Access 2000

Characters are displayed correctly in Access, just when I use ADODB (2.7)
to
read them in VB i get ? character instead of unicode characters.

I will display them in TreeView (capable of Unicode)

Is there any patch, fix or something, I know this thing is going around
newsgroups for a long time just I didn't find any solution for it on the
web.

Thanks,
B

Nov 13 '05 #3
VB does not support Unicode in any version <= 6.0 of any SP.

See Chapter 6 of Internationalization with Visual Basic (available for free
online at http://www.i18nwithvb.com/ ) for more info on the limitations. The
book and the code samples have info on the workarounds (third party
controls, owner draw, etc.).
--
MichKa [MS]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure and Font Technologies
Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Borko" <bo***@nospam.info> wrote in message
news:cn**********@ls219.htnet.hr...
hi
I am having problems getting unicode characters into VB. Using VB6 (sp3) and Access 2000

Characters are displayed correctly in Access, just when I use ADODB (2.7) to read them in VB i get ? character instead of unicode characters.

I will display them in TreeView (capable of Unicode)

Is there any patch, fix or something, I know this thing is going around
newsgroups for a long time just I didn't find any solution for it on the
web.

Thanks,
B

Nov 13 '05 #4
OK... so if anyone else read this and don't want to buy book (or can't wait
for) the solution is as follows

VB reads data from Access correctly, so it's working with Unicode internally
just fine

You can solve the controls problem by changing font script property from
Western to (let's say) Greek or Central European

When you get some data from the control it will not be in Unicode so you
will have to make lookup table for conversion (e.g. to and vice versa)

You will have to use it when reading from database and writing to control
and the reverse function when reading from control and writing to database

Check database (like Access) to see if you written correctly (Access is
Unicode :)

There is always Forms2.0 but you can not distribute it with your application
(because Microsoft said so).

Have fun... I know I won't
bo*****@yahoo.com

"Michael (michka) Kaplan [MS]" <mi*****@online.microsoft.com> wrote in
message news:41********@news.microsoft.com...
VB does not support Unicode in any version <= 6.0 of any SP.

See Chapter 6 of Internationalization with Visual Basic (available for
free
online at http://www.i18nwithvb.com/ ) for more info on the limitations.
The
book and the code samples have info on the workarounds (third party
controls, owner draw, etc.).
--
MichKa [MS]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure and Font Technologies
Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.
"Borko" <bo***@nospam.info> wrote in message
news:cn**********@ls219.htnet.hr...
hi
I am having problems getting unicode characters into VB. Using VB6 (sp3)

and
Access 2000

Characters are displayed correctly in Access, just when I use ADODB (2.7)

to
read them in VB i get ? character instead of unicode characters.

I will display them in TreeView (capable of Unicode)

Is there any patch, fix or something, I know this thing is going around
newsgroups for a long time just I didn't find any solution for it on the
web.

Thanks,
B


Nov 13 '05 #5
"Borko" <bo***@nospam.info> wrote...
OK... so if anyone else read this and don't want to buy book (or can't wait for)
I was not trying to sell any books here -- its out of print. So if you can
find it, then its from somewhere that will not be paying me any royalties.
:-)
the solution is as follows VB reads data from Access correctly, so it's working with Unicode internally just fine
Well, it has Unicode strings, yes. But almost anything you do with that
string in code outside of COM objects (write to a file, call an API, etc.)
will corrupt it and make them into question marks.
You can solve the controls problem by changing font script property from
Western to (let's say) Greek or Central European
This will not work properly for any of the languages here -- once the
strings are converted from Unicode, question marks is all you can get.
When you get some data from the control it will not be in Unicode so you
will have to make lookup table for conversion (e.g. to and vice versa)
You mean rather than using the APIs or the StrConv function, to use the
tables that already exist in Windows, the ones that did the actual
conversion.
You will have to use it when reading from database and writing to control
and the reverse function when reading from control and writing to database

Check database (like Access) to see if you written correctly (Access is
Unicode :)
Everything in this situation is Unicode for them, except for the treeview.
And the one from MS cannot be solved by any of what you just talked
about....
There is always Forms2.0 but you can not distribute it with your application (because Microsoft said so).


Well, there are also crashing bugs in some versions of it when hosted in
Access or VB -- environments where it was not tested. Sometimes Microsoft
likes to help people avoid that sort of problem. :-)
--
MichKa [MS]
NLS Collation/Locale/Keyboard Technical Lead
Globalization Infrastructure, Fonts, and Tools
Microsoft Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.
Nov 13 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

23 posts views Thread by Hallvard B Furuseth | last post: by
4 posts views Thread by Basil | last post: by
7 posts views Thread by Michael Davis | last post: by
14 posts views Thread by abhi147 | last post: by
8 posts views Thread by Preben Randhol | last post: by
7 posts views Thread by 7stud | last post: by
8 posts views Thread by mario | last post: by
8 posts views Thread by miztaken | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.