psychopy/psychopy — pull request #337 by smathot (2013-06-25 15:31:26+00:00)
Title: (Beginning of a) Fix to allow importing of PsychoPy on systems with special characters in the profile name.

On Windows systems with special characters in the profile name, an error occurred when concatenating `monitorFolder` with `self.name`, here:

-

This prevented PsychoPy from being usable on (I imagine) all Windows systems where the profile name contains special characters. A hack to fix this specific issue is to decode `monitorFolder` into a `Unicode` string. With this patch it now runs fine on my test system.

However, the more general problem is that PsychoPy is not Unicode safe: Internally `str` strings are used seemingly everywhere, which is a recipe for trouble, particularly when it comes to file-system operations. It's probably a pretty major undertaking (I know it was for OpenSesame, where I ran into the same issues!), but ideally *all* strings are decoded to `unicode` when they enter the program, and encoded back into `str` when they leave the program (if necessary, much of the input out can deal with `unicode`, so there's not always a need for conversion). As explained here:

-

Cheers!
Sebastiaan