9 lines
269 B
Python
9 lines
269 B
Python
import sys
|
|
try:
|
|
with open('frontend/admin/locales/zh-CN.js', 'rb') as f:
|
|
content = f.read()
|
|
content.decode('utf-8')
|
|
print('Valid UTF-8')
|
|
except UnicodeDecodeError as e:
|
|
print(f'Invalid UTF-8 at byte {e.start}: {content[e.start:e.start+10]}')
|