Blog
Windows XP is only good for English
Date: 3/8/2005
I love windows ;) you just have to hand it to them for screwing it up royally.

Lets see, Scribe had a problem receiving mail on 2k/XP systems where the user's username had an accent in the name. So I created an account called Máya and loaded up Scribe, sure enough it fails to receive mail. Then I get to the bottom of the problem, and the windows API call GetTempPath is returning the wrong path. Given that the path to the temp folder is:
C:\\Documents and Settings\\Máya\\Local Settings\\Temp
GetTempPath on XP no less returns you:
C:\\DOCUME~1\\MAYA\\LOCALS~1\\Temp
which doesn't actually exist because the username has been "ascii-fied".

So I change the code to use GetTempPathW and try and compile. VC++ 6 falls over with the error message "can't create temp file". Hehehehehe. I wonder why!

Then of course applications that use GetTempPath start breaking and doing weird things. Like some app, not sure which, decided in it's infinite wisdom that since the temp path doesn't exist... well it should CREATE it. Yeah that's the right thing to do... sure... so now you have the real temp path and an "ascii-fied" version. Which isn't going to confuse anyone or create problems... ;)
 
Reply
From:
Email (optional): (Will be HTML encoded to evade harvesting)
Message:
 
Remember username and/or email in a cookie.
Notify me of new posts in this thread via email.
BBcode:
[q]text[/q]
[url=link]description[/url]
[img]url_to_image[/img]
[pre]some_code[/pre]
[b]bold_text[/b]