Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - Unicode VBScript messagebox

Reply
 
Old 07-07-2009   #1 (permalink)
Bino


 
 

Unicode VBScript messagebox

Can any one please tell me how to make a VBscript messagebox support unicode
characters.
MsgBox("ストケースの部分をテ",vbYesNoCancel + vbQuestion, title)

The string in Msgbox is displayed as squares in the messagebox

Thanks in advance.


My System SpecsSystem Spec
Old 07-08-2009   #2 (permalink)
HAL07


 
 

Re: Unicode VBScript messagebox

Bino wrote:
Quote:

> Can any one please tell me how to make a VBscript messagebox support unicode
> characters.
> MsgBox("ストケースの部分をテ",vbYesNoCancel + vbQuestion, title)
>
> The string in Msgbox is displayed as squares in the messagebox
>
> Thanks in advance.
>
http://www.mombu.com/microsoft/scrip...p-2634156.html is the only thread
covering Unicode.


--
-- HAL07, Engineering Services, Norway
My System SpecsSystem Spec
Old 07-08-2009   #3 (permalink)
Paul Randall


 
 

Re: Unicode VBScript messagebox


"Bino" <Bino@xxxxxx> wrote in message
news:B64374DB-C4AE-46A3-9744-17868D6A83B3@xxxxxx
Quote:

> Can any one please tell me how to make a VBscript messagebox support
> unicode
> characters.
> MsgBox("??????????",vbYesNoCancel + vbQuestion, title)
>
> The string in Msgbox is displayed as squares in the messagebox
>
> Thanks in advance.
I don't have any definite answers for you. Hopefully someone with
'internationalization' knowledge will jump in here.

I copied your MsgBox statement from my OE6 newsreader window to NotePad and
saved it in a .VBS file as Unicode and another .VBS file as UTF-8. These
two files display the same in Notepad on this US-English WXP-SP3 system.
The text to
be displayed by the message box is displayed as boxes within Notepad.
Notepad's font is set to Lucida Console. The .VBS file saved as Unicode
runs, but the text is in the message box is displayed as boxes. The .VBS
file saved as UTF-8 causes a scripting compilation error: Invalid Character,
because VBScript only understands Ansi 8-bit characters and 16-bit Unicode
characters, not variable bytes per character encodings like UTF-8.

When I boot from an older and wiser WXP-SP2 partition on this same computer,
Notepad
displays the message as Japanese (or some characters foreign to me,
definitely not boxes) text. This partition's Notepad uses the same Lucida
Console font. Running the Unicode script, the message box displays the same
Japanese
text seen within Notepad; I've attached the .png graphic of the message box.
I am assuming that this older partition got wiser by my allowing IE to
download/install some language-related stuff while I
was surfing the net.

-Paul Randall




My System SpecsSystem Spec
Old 07-08-2009   #4 (permalink)
Bino


 
 

Re: Unicode VBScript messagebox

Thanks HAL07 ,Paul Randal for your replies..

I have solved my problem. The problem was due to the non availabilty of the
font. After installing the east asian languages in my system. The Unicode
text in the message box is displayed correctly

"Paul Randall" wrote:
Quote:

>
> "Bino" <Bino@xxxxxx> wrote in message
> news:B64374DB-C4AE-46A3-9744-17868D6A83B3@xxxxxx
Quote:

> > Can any one please tell me how to make a VBscript messagebox support
> > unicode
> > characters.
> > MsgBox("??????????",vbYesNoCancel + vbQuestion, title)
> >
> > The string in Msgbox is displayed as squares in the messagebox
> >
> > Thanks in advance.
>
> I don't have any definite answers for you. Hopefully someone with
> 'internationalization' knowledge will jump in here.
>
> I copied your MsgBox statement from my OE6 newsreader window to NotePad and
> saved it in a .VBS file as Unicode and another .VBS file as UTF-8. These
> two files display the same in Notepad on this US-English WXP-SP3 system.
> The text to
> be displayed by the message box is displayed as boxes within Notepad.
> Notepad's font is set to Lucida Console. The .VBS file saved as Unicode
> runs, but the text is in the message box is displayed as boxes. The .VBS
> file saved as UTF-8 causes a scripting compilation error: Invalid Character,
> because VBScript only understands Ansi 8-bit characters and 16-bit Unicode
> characters, not variable bytes per character encodings like UTF-8.
>
> When I boot from an older and wiser WXP-SP2 partition on this same computer,
> Notepad
> displays the message as Japanese (or some characters foreign to me,
> definitely not boxes) text. This partition's Notepad uses the same Lucida
> Console font. Running the Unicode script, the message box displays the same
> Japanese
> text seen within Notepad; I've attached the .png graphic of the message box.
> I am assuming that this older partition got wiser by my allowing IE to
> download/install some language-related stuff while I
> was surfing the net.
>
> -Paul Randall
>
>
>
My System SpecsSystem Spec
Old 07-09-2009   #5 (permalink)
Paul Randall


 
 

Re: Unicode VBScript messagebox

Thanks for letting us know that your problem is fixed.
I have a question about the fix. Did 'installing the east asian languages'
actually install a new or updated font that includes glyphs you didn't
previously have for that font, or did it update some mysterious language
information that allowed your system to display the correct glyphs for the
Unicode code points in your MsgBox's message?

-Paul Randall

"Bino" <Bino@xxxxxx> wrote in message
news:8A873F66-EF48-471F-AF54-A4749589A2F3@xxxxxx
Quote:

> Thanks HAL07 ,Paul Randal for your replies..
>
> I have solved my problem. The problem was due to the non availabilty of
> the
> font. After installing the east asian languages in my system. The Unicode
> text in the message box is displayed correctly
>
> "Paul Randall" wrote:
>
Quote:

>>
>> "Bino" <Bino@xxxxxx> wrote in message
>> news:B64374DB-C4AE-46A3-9744-17868D6A83B3@xxxxxx
Quote:

>> > Can any one please tell me how to make a VBscript messagebox support
>> > unicode
>> > characters.
>> > MsgBox("??????????",vbYesNoCancel + vbQuestion, title)
>> >
>> > The string in Msgbox is displayed as squares in the messagebox
>> >
>> > Thanks in advance.
>>
>> I don't have any definite answers for you. Hopefully someone with
>> 'internationalization' knowledge will jump in here.
>>
>> I copied your MsgBox statement from my OE6 newsreader window to NotePad
>> and
>> saved it in a .VBS file as Unicode and another .VBS file as UTF-8. These
>> two files display the same in Notepad on this US-English WXP-SP3 system.
>> The text to
>> be displayed by the message box is displayed as boxes within Notepad.
>> Notepad's font is set to Lucida Console. The .VBS file saved as Unicode
>> runs, but the text is in the message box is displayed as boxes. The .VBS
>> file saved as UTF-8 causes a scripting compilation error: Invalid
>> Character,
>> because VBScript only understands Ansi 8-bit characters and 16-bit
>> Unicode
>> characters, not variable bytes per character encodings like UTF-8.
>>
>> When I boot from an older and wiser WXP-SP2 partition on this same
>> computer,
>> Notepad
>> displays the message as Japanese (or some characters foreign to me,
>> definitely not boxes) text. This partition's Notepad uses the same
>> Lucida
>> Console font. Running the Unicode script, the message box displays the
>> same
>> Japanese
>> text seen within Notepad; I've attached the .png graphic of the message
>> box.
>> I am assuming that this older partition got wiser by my allowing IE to
>> download/install some language-related stuff while I
>> was surfing the net.
>>
>> -Paul Randall
>>
>>
>>

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
MessageBox doesn't exist in .NET 1.1? .NET General
[system.Windows.Forms.MessageBox] PowerShell
MessageBox from Window Service in Vista Vista General
MessageBox from Window Service in Vista Vista General
messagebox and .NET framework PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46