Logo
Explore Help
Register Sign In
fengqi/lv_micropython
1
0
Fork 0
You've already forked lv_micropython
Code Issues Pull Requests 1 Actions Packages Projects Releases Wiki Activity
lv_micropython/tests/unicode/file1.py

5 lines
95 B
Python
Raw Normal View History

Use mode/encoding kwargs in io and unicode tests mode argument is used to assert it works encoding argument is used to make sure CPython uses the correct encoding as it does not automatically use utf-8
2014-10-04 08:54:16 +02:00
f = open("unicode/data/utf-8_1.txt", encoding="utf-8")
tests: Add basic test for unicode file i/o.
2014-06-15 23:28:39 +03:00
l = f.readline()
print(l)
print(len(l))
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 46ms Template: 1ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API