julia读取文本中的中英文字符

# 假设有文本文件中存储中英文字符如下
chinese
english
我爱周杰伦

# -----------------------------
# 代码如下
f = open( "str.txt", "r" )
n = countlines( f )
seekstart( f )

for i = 1:n
    str = readline( f )
    println( str )
end

close( f )

猜你喜欢

转载自blog.csdn.net/chd_lkl/article/details/81430008