MS has done it on their part, in MS C++ if you use an ifDef statement for unicode then the one piece of code will comepile for either. The reason for this is simple.
For example, if nothing is specified then:
Messagebox() is MessageboxA() but IfDef Unicode then
Messagebox() is MessageboxW() so all you have to do is add the IfDef to the start of your code and your done! (sort of)
but in PB there are no includes for unicode so you can't do this. and even if your combined my include with PB's you'd be screwed because of the PB syntax.
If you use a LEN() command one an ASCIIZ type it will return the count till the first Chr$(0) so "Hello" in unicode will return 1 as the length "H" I use a unicode.inc include which has uLEN(), Strcpy(), StrCat(), etc to get around this but I am far from finished. Where possible I have used arrays of Words as per the C++ wChar Type.
To finally answer your question.
If your write code based on unicode, you will find (depending on your code) that it may not run under 95, 98 and ME
But, the reverse is also true. You will notice that MS release a '95 and NT version of IE where as Netscape released just one. This was the reason.
You could write an app to detect the OS and run appropriately but this would be excessive, the best solution in PB is unfortunately to flush international coding down the the TOO hard basket toilet, as the extra effort is a pain. under MS c++ you write your app, you compile it twice and release a win95-98-ME version and an NT-2K version. The OS's are different, so should your code be.
What I am trying to do (slowly because My IT profession is not programming so I'm busy) is bring to PB a proper guide for international code. Feel free to help.
The goal will be to identify non unicode compliant functions (Len, left, right, mid etc) and build new ones (thise is where C excels over basic (not just PB) these are not built in and can be overwritten. Re-organise the win32api,inc into ifDefs so you can specify which type to use, and untimately (and this is a long way off) use the same code base for ascii or uncode so that there will be no excuse for non international applications
Here endith the lesson
Amen

------------------
Paul Dwyer
Network Engineer
Aussie in Tokyo
(Paul282 at VB-World)
Leave a comment: