preetytable can't display chinese character normally.
GoogleCodeExporter opened this issue · comments
please save the attachment "test.ansi",and to see the displayed table in my
console.
from prettytable import PrettyTable
fh= open("test.ansi", "r",encoding="gbk")
header=fh.readline().strip().split(",")
x = PrettyTable(header)
x.align["乘客姓名"]="l"
for row in fh.readlines():
x.add_row(row.strip().split(","))
print(x)
Original issue reported on code.google.com by elearn2...@gmail.com
on 12 Apr 2014 at 7:25
Attachments: