#! /usr/bin/env python3


import pathlib


for path in pathlib.Path(".").glob("*.asn"):
    try:
        f = open(path, "r", encoding="utf-8")
        f.read()

    except UnicodeDecodeError:
        f = open(path, "r", encoding="gbk")
        data = f.read()
        f.close()
        f = open(path, "w", encoding="utf-8")
        f.write(data)
        f.close()

