This website requires JavaScript.
Explore
Help
Register
Sign In
fengqi
/
lv_micropython
Watch
1
Star
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
Unescape
Escape
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