Answers for "python read unicode file"

7

python open encoding utf-8

from io import open
f = open("test", mode="r", encoding="utf-8")
Posted by: Guest on November-17-2020
0

how to read unicode in python

import codecs
with codecs.open('unicode.rst', encoding='utf-8') as f:
    for line in f:
        print repr(line)
Posted by: Guest on July-16-2021

Python Answers by Framework

Browse Popular Code Answers by Language