โค้ด: เลือกทั้งหมด
res = comment[0:14] + str('...')
โค้ด: เลือกทั้งหมด
comment.encode(encoding='UTF-8',errors='strict')
โค้ด: เลือกทั้งหมด
encode('utf-8')
โค้ด: เลือกทั้งหมด
encode('ascii')
โค้ด: เลือกทั้งหมด
import textwrap
wrapper = textwrap.TextWrapper(width=14)
res = wrapper.fill(text=comment)
มีปัญหากับภาษาไทย ส่งออกมาเป็นภาษาต่างดาว และ error ascii