If you select “Refer to encoding declaration” in the Format preferences pane, in-document encoding declarations such as “charset=”, “encoding=”, “@charset”, “encoding:” or “coding:” will take precedence when CotEditor auto-detects the character encoding.
=> Using encoding declarations for auto-detection