Open GoogleCodeExporter opened 9 years ago
您好,我想对您的改动发表一点我的看法。
在您的改进版本中,如果用户对“一条记录”进行翻译,就��
�出错:
>>> a = "一条记录"
>>> b = jft2.j2f('gbk', 'gbk', a)
>>> print b
一条兼@件
>>>
针对这个问题,我阅读了您的代码,然后发现问题的原因是��
�样的:
“一”的编码是\xd2\xbb
若j2f以“一”为参数调用_j2f函数,那么,pos的值会被赋为0,
这时,由于您的while条件的写法,_j2f会返回NONE,从而间接导�
��了混乱。对此,我认为,有必要在jt和ft的开头处加入"\x00\x0
0",这样就可以解决问题了。
Original comment by interest...@gmail.com
on 7 Mar 2014 at 9:11
Attachments:
Original issue reported on code.google.com by
lidongok@gmail.com
on 1 Dec 2009 at 7:50Attachments: