You have your parameters wrong:
code:
FileSystemObject.CreateTextFile
object.CreateTextFile filename [, overwrite[, unicode]]
That means:
- filename is the path to the file to be created.
- overwrite is a Boolean defining whether the existing file may be overwritten.
- unicode is a Boolean defining whether the text file should be saved as Unicode (true) or AscII (false, default).
That means that the '2' is interpreted as a Boolean for the overwrite parameter and becomes converted to 'true', and that the 'true' or 'false' in your last parameter actually changes the text encoding. This is what causes your "strange characters" (which aren't strange at all, in fact).
To fix this, just leave out the invalid '2' parameter. This way, your true/false are correctly sent as overwrite parameter.
code:
fichier2 = fso.CreateTextFile(chemin_fichier_calendrier, true); //Allow overwrite
fichier2 = fso.CreateTextFile(chemin_fichier_calendrier, false); //Don't allow overwrite