Skip to content

error occurs when .py declared ' utf-8 ' but sys.stdin.encoding == GBK #17

@umialpha

Description

@umialpha

I am writing .py on windows platform, and all the .py are declared with 'utf-8' format where sys.stdin.encoding == 'GBK'.
when exec(f.read()) , trace occurs as follows:
SyntaxError: encoding declaration in Unicode string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions