Placing
# cython: c_string_encoding=default
in the first two lines of the file will trigger the source coding detector and try to open the file in default encoding, which of course doesn't exist.
(Perhaps we should always be ignoring it, as it's only applied if it happens to fall within the first two lines...)