Thanks G_d for UTF-8 support in all major browsers. Now all those different
webpage encodings can just go away.
"Joseph M. Newcomer" <newcomer@flounder.com> wrote in message
See below...
On Thu, 8 Apr 2010 20:48:19 -0500, "Liviu" <lab2k1@gmail.c0m> wrote:
"Alexander Grigoriev" <alegr@earthlink.net> wrote...
See windows.h:
#define DeleteFile DeleteFileA
By the way, it doesn't make sense to do non-UNICODE software
anymore, which yours seems.
If you meant strictly that DeleteFileA doesn't make sense then I'll
agree (same applies to most other Win32 API calls for that matter).
And if you meant that apps need be Unicode aware then I'll agree, too.
But the blanket statement that non-UNICODE software should be shunned
is too strong IMHO. There still are cases where it makes a lot of sense
to build non-Unicode (i.e. no _UNICODE or UNICODE #define'd) and
explicity call the "W" flavor of the API functions where applicable. One
example at random, an application which stores text as UTF-8 internally,
and does more string manipulations inside than API calls outside.
****
What I tell my students:
"Someday, your boss is going to drop in and say 'We just landed a big
contract in <Japan,
Korea, China>. How soon can you have the software ready to run there"
Which answer do you want to give
(a) Give me a couple days, and I'll be able to give you an estimate.
Three to six
weeks, probably
(b) How soon can you get the translator in here?
The reality is that we live in a very global market, and anyone who knows
their company
product will never need Unicode is living in a fantasy world.
And if you thnk UTF-8 makes it easy, you have never actually had to deal
with a language
that used a multibyte encoding in UTF-8. It is NOT easy, and is highly
error-prone. I
know, I've had to clean up some of the messes that have resulted from
this. First thing I
do is convert to Unicode. Then REMOVE all the erroneous code that was
failing to deal
with UTF-8 or MBCS properly. If I use UTF-8, it is at the boundaries
(write UTF-8 files,
read them, use it across network packets, etc.)
joe
****
Liviu
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm