What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » Text in Unicode

Text in Unicode
Author: Message:
eSouL
Junior Member
**


Posts: 36
Joined: Oct 2005
O.P. Text in Unicode
How do I program a plugin to send and receive Unicode text? Currently, all unicode characters are shown as question marks. Thanks!

This post was edited on 10-07-2005 at 07:33 AM by eSouL.
10-07-2005 07:33 AM
Profile E-Mail PM Find Quote Report
J-Thread
Full Member
***

Avatar

Posts: 467
Reputation: 8
– / Male / –
Joined: Jul 2004
RE: Text in Unicode
I don't think that is possible... Although msn should know Unicode, but I doubt if it is possible for plugins to use it.

It are all just ASCII strings as fas as I know...
10-07-2005 08:10 AM
Profile E-Mail PM Find Quote Report
eSouL
Junior Member
**


Posts: 36
Joined: Oct 2005
O.P. RE: Text in Unicode
My sContactName values are all messed up because of Unicode in their names.. Are there any workarounds?
10-07-2005 08:26 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Text in Unicode
For starters, about what programming language are you talking about? Second, every programming language is capable of receiving and sending unicode text.

In other words, there is no need for workarounds. You only need to do it correctly ;)


This post was edited on 10-07-2005 at 11:55 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-07-2005 11:54 AM
Profile PM Find Quote Report
Mnjul
forum super mod
******

Avatar
plz wub me

Posts: 5396
Reputation: 58
– / Other / Flag
Joined: Nov 2002
Status: Away
RE: Text in Unicode
Did you use the functions with the suffix W and exported them instead of the "normal" functions (those without the suffix W)? For example, use ReceiveNotifyW, ParseCommandW, ParseTagW...etc. Also, you are compiling/building your DLL with Unicode option enabled?( I know there is one in Visual Studio if that's what you are using) You have to set them all correctly so that Plus! will recognize your plugin as a Unicode-supporting one and will send Unicode text to your plugins (that is, for example, if you use ReceiveNotifyW, the sContactName will be of WCHAR type and it will of course be Unicode) ;)

This post was edited on 10-07-2005 at 12:29 PM by Mnjul.
10-07-2005 12:29 PM
Profile PM Web Find Quote Report
eSouL
Junior Member
**


Posts: 36
Joined: Oct 2005
O.P. RE: Text in Unicode
Hi, I'm using VB6. How do I make my plugin use the W functions? Do I just apped all the normal function names with a suffix W? Sorry I'm new to this. I also can't seem to find the option to compile to Unicode-aware. Thanks for your help!
10-10-2005 02:27 AM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Text in Unicode
quote:
Originally posted by eSouL
Hi, I'm using VB6. How do I make my plugin use the W functions? Do I just apped all the normal function names with a suffix W?
That highly depends on what API's you use. Not all API's are available as unicode functions. To know if a specific API is available as unicode you need to look it up in the msdn library.

Furthermore, the unicode equivalents require you to parse text in a different manner. This is because VB6 always converts unicode strings to ansi strings before they are send to these API's (unicode or not). Thus in order to send unicode text you need to parse them as pointers. Or you must convert the unicode strings first to unicode (this may sound strange, but it simply means fooling VB6).

Take a look at my posts about sending a PSM to MSN Messenger, they deal with unicode and the common errors people have with them: http://forums.msnfanatic.com/index.php?showtopic=11226

quote:
Originally posted by eSouL
I also can't seem to find the option to compile to Unicode-aware. Thanks for your help!
VB6 is always unicode internally. You don't need to set anything.



But note that VB6 does not support unicode externaly, this means it will always show ansi strings in its controls. Getting around that is far from easy (unless you use the not-distributable Forms2.0 library, as this contains unicode aware controls)...


All in all it is very difficult to explain everything as there is much to know about all this.

http://www.oreilly.com/catalog/win32api/chapter/ch06.html
^^ this is mandatory to understand completely and in detail before you start working with unicode in VB6

another link which deals with some stuff:
http://support.microsoft.com/default.aspx?scid=kb;en-us;205277

This post was edited on 10-10-2005 at 08:57 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-10-2005 08:54 AM
Profile PM Find Quote Report
eSouL
Junior Member
**


Posts: 36
Joined: Oct 2005
O.P. RE: Text in Unicode
Thanks for the reply Cookies! I discovered that the VC++ sample header file includes declarations of the W functions, and I thought it would be relatively to port over to VB6. I'll see what can be done..
10-10-2005 03:34 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Text in Unicode
Yes, many (but certainly not all!) API's have both an unicode version (reconizeable by the "W" endfix) and an ansi version (reconizeable by the "A" endfix). To know exactly if such variations exist for a specific function (and if they actually work on the OS you're planning to run your app on!!!!), you can look them up in the [http://www.msdn.com/]MSDN Library[/url]. It will also tell you every detail about that API function...

And also, certainly do not forget to read (and understand):
http://www.oreilly.com/catalog/win32api/chapter/ch06.html
:p;)
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-10-2005 10:34 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On