Differences between revisions 5 and 7 (spanning 2 versions)
Revision 5 as of 2008-10-29 08:49:32
Size: 1041
Editor: jigloo
Comment:
Revision 7 as of 2009-12-25 07:16:40
Size: 974
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
[[TableOfContents]] <<TableOfContents>>
Line 6: Line 6:
[[Include(ZPyUGnav)]] <<Include(ZPyUGnav)>>
Line 36: Line 36:
创建 by -- jigloo [[[DateTime(2008-10-28T00:25:44Z)]]]
||<^>[[PageComment2]]||<^>[:/PageCommentData:PageCommentData]''||
创建 by -- jigloo [<<DateTime(2008-10-28T00:25:44Z)>>]

简繁转换com组件

office 2007的版本的MSTR2TSC.DLL导出了四个简繁转换相关的函数 TCSCInitialize TCSCUninitialize TCSCConvertText TCSCFreeConvertedText 我用vc6 ATL把它封装为com组件,方便给python调用 例子如下

>>> import win32com.client
>>> conv = win32com.client.Dispatch('TCSCConv.Office')
>>> print conv.ToTrad(u'计算机光盘')
計算機光盤
>>> print conv.ToTradByWord(u'计算机光盘')
電腦光碟

组件和vc6代码如下 http://www.namipan.com/d/TCSCConv.7z/5c91c2bcf6462999111431ae4ee82eb33b9d968640195800

(不好意思,第一次用wiki, 不小心把原来的页面覆盖了,谁帮忙恢复一下。)


反馈

创建 by -- jigloo [2008-10-28 00:25:44]

MiscItems/2008-10-28 (last edited 2009-12-25 07:16:40 by localhost)