Discussion:
DBCS Character Support.
(too old to reply)
Gajendra
2008-08-26 10:15:01 UTC
Permalink
Hi,

I have an Add-In developed using VB6 and Microsoft Outlook. This Add-in is
supported only in English language. Now I am intending to support a few other
languages which are Chinese, Japanese, Spanish and Korean.

For Spanish it works fine for me but when I open a mail in Japanese, I see
that the Subject of the mail which I am displaying at VB Form in text box
does not come properly. It comes as ???????. Not only text box, other
controls also which I am using on Form does not display Japanese font
properly. While I googled, I got to know that DBCS is not supported by VB6.

Is that true? If not how do I support DBCS (Japanese) with my Add-in without
changing my locale to Japanese( I do not have that).

Regards,
Gajendra
Dean Earley
2008-08-27 10:03:54 UTC
Permalink
Post by Gajendra
Hi,
I have an Add-In developed using VB6 and Microsoft Outlook. This Add-in is
supported only in English language. Now I am intending to support a few other
languages which are Chinese, Japanese, Spanish and Korean.
For Spanish it works fine for me but when I open a mail in Japanese, I see
that the Subject of the mail which I am displaying at VB Form in text box
does not come properly. It comes as ???????. Not only text box, other
controls also which I am using on Form does not display Japanese font
properly. While I googled, I got to know that DBCS is not supported by VB6.
Is that true? If not how do I support DBCS (Japanese) with my Add-in without
changing my locale to Japanese( I do not have that).
It is not true. VB6 internally uses UTC16 (full unicode) and uses MBCS
(the proper term for DBCS) and the current locale by default when
interfacing with API calls and file I/O, etc.

The problem you are seeing is that the font you are using does not
support Japanese characters so they are appearing as the fallback "?".
To do this properly, you have to use a Japanese capable font and set the
locale.
--
Dean Earley (***@icode.co.uk)
i-Catcher Development Team

iCode Systems
Dean Earley
2008-08-27 10:20:13 UTC
Permalink
Post by Dean Earley
Post by Gajendra
Hi,
I have an Add-In developed using VB6 and Microsoft Outlook. This
Add-in is supported only in English language. Now I am intending to
support a few other languages which are Chinese, Japanese, Spanish and
Korean.
For Spanish it works fine for me but when I open a mail in Japanese, I
see that the Subject of the mail which I am displaying at VB Form in
text box does not come properly. It comes as ???????. Not only text
box, other controls also which I am using on Form does not display
Japanese font properly. While I googled, I got to know that DBCS is
not supported by VB6.
Is that true? If not how do I support DBCS (Japanese) with my Add-in
without changing my locale to Japanese( I do not have that).
It is not true. VB6 internally uses UTC16 (full unicode)
Sorry, UTF-16/UCS-2, not UTC :)
--
Dean Earley (***@icode.co.uk)
i-Catcher Development Team

iCode Systems
Gajendra
2008-09-05 13:16:05 UTC
Permalink
Hi Dean,

Thanks for your reply.

You were right the problem was font only. Once I set the font 'MS Gothic'
for my controls on VB form, things worked fine for me.

I need a little assitance from you further that is " The text I am
displaying in text box on my VB form(say Form 1), I am using it to build a
URL for the browser control which is on my another form(say Form 2). Though
on Form 1, I am able to display text in Japanese successfully but when I use
it within URL and run my Form 2, the Japanese characters are again garbelled
in URL. I believe I need to change those characters to Ascii value. Could you
please help me out how could I change my DBCS chars to the ASCII so that the
URL i have constructed, work fine"

I would appreciate your response.

Thanks again!

Regards,
--
Gajendra
Post by Dean Earley
Post by Dean Earley
Post by Gajendra
Hi,
I have an Add-In developed using VB6 and Microsoft Outlook. This
Add-in is supported only in English language. Now I am intending to
support a few other languages which are Chinese, Japanese, Spanish and
Korean.
For Spanish it works fine for me but when I open a mail in Japanese, I
see that the Subject of the mail which I am displaying at VB Form in
text box does not come properly. It comes as ???????. Not only text
box, other controls also which I am using on Form does not display
Japanese font properly. While I googled, I got to know that DBCS is
not supported by VB6.
Is that true? If not how do I support DBCS (Japanese) with my Add-in
without changing my locale to Japanese( I do not have that).
It is not true. VB6 internally uses UTC16 (full unicode)
Sorry, UTF-16/UCS-2, not UTC :)
--
i-Catcher Development Team
iCode Systems
Dean Earley
2008-09-05 14:27:37 UTC
Permalink
Post by Gajendra
Hi Dean,
Thanks for your reply.
You were right the problem was font only. Once I set the font 'MS Gothic'
for my controls on VB form, things worked fine for me.
I need a little assitance from you further that is " The text I am
displaying in text box on my VB form(say Form 1), I am using it to build a
URL for the browser control which is on my another form(say Form 2). Though
on Form 1, I am able to display text in Japanese successfully but when I use
it within URL and run my Form 2, the Japanese characters are again garbelled
in URL. I believe I need to change those characters to Ascii value. Could you
please help me out how could I change my DBCS chars to the ASCII so that the
URL i have constructed, work fine"
Japanese/unicode needs to be encoded in some way before putting them in
a URL, either as shift_jis or hex encoded.
How they are encoded depends entirely on where they are being sent, and
how it expects them.
If it is the hostname itself, it is different again and uses IDN I think.
--
Dean Earley (***@icode.co.uk)
i-Catcher Development Team

iCode Systems
Gajendra
2008-09-06 17:57:03 UTC
Permalink
Dear Sir,

What I am looking for is that say for example if the text in the text box on
my vb form is as below
ドライビングフィールド値を選択してください。

Then I am forming a URL like
http:///www.abc123de.com/PateientName=ドライビングフィールド値を選択してください。/pateientID=12-ab12e

how do I encode this URL in UTF-8 in VB. The characters in URL are
DBCS(Japanese).

Please help me out, I am running short of time.

Regards,
Gajendra
Post by Gajendra
Hi Dean,
Thanks for your reply.
You were right the problem was font only. Once I set the font 'MS Gothic'
for my controls on VB form, things worked fine for me.
I need a little assitance from you further that is " The text I am
displaying in text box on my VB form(say Form 1), I am using it to build a
URL for the browser control which is on my another form(say Form 2). Though
on Form 1, I am able to display text in Japanese successfully but when I use
it within URL and run my Form 2, the Japanese characters are again garbelled
in URL. I believe I need to change those characters to Ascii value. Could you
please help me out how could I change my DBCS chars to the ASCII so that the
URL i have constructed, work fine"
I would appreciate your response.
Thanks again!
Regards,
--
Gajendra
Post by Dean Earley
Post by Dean Earley
Post by Gajendra
Hi,
I have an Add-In developed using VB6 and Microsoft Outlook. This
Add-in is supported only in English language. Now I am intending to
support a few other languages which are Chinese, Japanese, Spanish and
Korean.
For Spanish it works fine for me but when I open a mail in Japanese, I
see that the Subject of the mail which I am displaying at VB Form in
text box does not come properly. It comes as ???????. Not only text
box, other controls also which I am using on Form does not display
Japanese font properly. While I googled, I got to know that DBCS is
not supported by VB6.
Is that true? If not how do I support DBCS (Japanese) with my Add-in
without changing my locale to Japanese( I do not have that).
It is not true. VB6 internally uses UTC16 (full unicode)
Sorry, UTF-16/UCS-2, not UTC :)
--
i-Catcher Development Team
iCode Systems
Loading...