Groups | Blog | Home
all groups > dotnet internationalization > july 2004 >

dotnet internationalization : NotifyIcon exception with Kanji



Eddie Berman
7/14/2004 7:51:16 PM
I just received a report that the Japanese version of our app crashes with a
exception error likely due to our setting the NotifyIcon with a text string
greater than the allowable 64 bytes. Since we ensure that any string is not
greater than 64 chars (for English), it's likely that the Japanese version
needs to be no greater than 32 chars.
Before I go and dig out and set up my Japanese machine to run a test, has
anyone had any experience with this problem? It would be nice to know that
everyone but me knows the answer and can confirm my suspicions.

Here's the salient JIT debug output:
at System.Windows.Forms.UnsafeNativeMethods.Shell_NotifyIcon(Int32
message, NOTIFYICONDATA pnid)
at System.Windows.Forms.NotifyIcon.UpdateIcon(Boolean showIconInTray)
at System.Windows.Forms.NotifyIcon.set_Text(String value)

Thanks,
Ed B.

Michael (michka) Kaplan [MS]
7/15/2004 3:44:11 PM
Some questions:

Do you know the exact definition of the exception?

Do you know the kind of platform (Win9x or NT based) ?

Do you know the version of the framework?

As stated, it is hard to know what the actual issue is, and I would not want
to assume that the cause is as hypothesized.


--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.


[quoted text, click to view]

Eddie Berman
7/19/2004 8:58:37 PM
The framework version is 1.1.4322.
The Exception text is:
System.ArgumentException: -",ߍz,Ý.¶Zs-ñ,ð Unicode ,©,ç ANSI
,É.ÏS·,Å,«,È,©,Á,½,½,߁AO^,ðW¬,Å,«,Ü,¹,ñ,Å,µ,½B
at System.Windows.Forms.UnsafeNativeMethods.Shell_NotifyIcon(Int32
message, NOTIFYICONDATA pnid)
at System.Windows.Forms.NotifyIcon.UpdateIcon(Boolean showIconInTray)
at System.Windows.Forms.NotifyIcon.set_Text(String value)
....

The behavior only occurred on Win98 (tested fine on XP and W2K). I reduced
the max number of chars to 31 when the culture is "ja" and that fixed the
problem (32 worked as well, but with the release eminent, I'm being
cautious).

Since this now works, it's no longer a pressing issue, though I'd love to
know why it occurred. The current oddity we're suddenly faced with is about
Japanese text displaying as boxes on Win2K. I posted a question about that
defect on this newsgroup this evening. After that's fixed, we may actually
release!

Thanks,
Ed

"Michael (michka) Kaplan [MS]" <michkap@online.microsoft.com> wrote in
message news:uPfkH1raEHA.1248@TK2MSFTNGP11.phx.gbl...
[quoted text, click to view]

Mihai N.
7/20/2004 1:08:17 AM
[quoted text, click to view]

Most likely the font used does not support Japanese.


--
Mihai
-------------------------
Michael (michka) Kaplan [MS]
7/20/2004 6:35:33 AM
"Eddie Berman" <eddieberman2000@yahoo.com> wrote...

[quoted text, click to view]

Ok, this looks like a limitation in the Unicode "wrappers" on Win9x.
Unfortunate. :-(

But since you have a workaround, I guess you are okay. :-)

[quoted text, click to view]

I think this has a lot to do with the font choice -- in the other thread you
said you are using Verdana, which has neither CJK glyphs nor built-in font
linking support across the system. So I would not expect it to do a good job
with font display on all systems....


--
MichKa [MS]
NLS Collation/Locale/Keyboard Development
Globalization Infrastructure and Font Technologies
Windows International Division

This posting is provided "AS IS" with
no warranties, and confers no rights.

AddThis Social Bookmark Button