Fixed AfterEffects plugin to support Japanese warning messages.
self.AddStdoutHandlerCallback( "WARNING:(After Effects 警告: .*)" ).HandleCallback += self.HandleStdoutWarning #Japanese
But when I run it I get an error.
SyntaxError : ("(unicode error) 'utf-8' codec can't decode byte 0x8c in position 23: invalid start byte", ('C:\\ProgramData\\Thinkbox\\Deadline10\\workers\\foo\\plugins\\foo\\AfterEffects.py', 123, 39, ' self.AddStdoutHandlerCallback( "WARNING:(After Effects 警告: .*)" ).HandleCallback += self.HandleStdoutWarning #Japanese\n'))
The environment is Python3 and the file is encoded in UTF-8, with no encoding definition. (It is Python3, so it should be UTF-8.)
After trying various things, I found the following.
- Encode the file in sjis(cp932).
- Encoding definition is set to cp932.
Now it works correctly, but why is it not processed in UTF-8?
I don’t know if this is a bug or normal behavior.
Is it necessary to define sjis(cp932) in Japanese environment?