ImeLib v0.1 測試報告 (二):Vista

延續上一篇測試報告,這次測試的作業平台是 Windows Vista 繁體中文版,已內建微軟新注音 10.0。結果出乎意料,ImeLib 的範例程式竟無法取得注音和拼音字根,只有日文平假名/片假名的功能可正常運作。用 RegEdit 搜尋關鍵字 MSIME,只能找到 MSIME.Japan 的註冊資訊。
這情形跟我在測試 Windows Server 2008 的情況一樣,但這次的解決方法並不是安裝 Office 2007 。

透過 Google,我找到一篇微軟的技術支援文章:Ruby text is not displayed in the Phonetic Guide dialog box in Word on a computer that is running Windows Vista,其描述的狀況跟我碰到的問題很像,於是照該文的解法,將下列文字存成 Ruby.reg 並匯入 Windows registry:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\MSIME.Taiwan]
@="IMTCCORE"

[HKEY_CLASSES_ROOT\MSIME.Taiwan\CLSID]
@="{F407D01A-0BCB-4591-9BD6-EA4A71DF0799}"

[HKEY_CLASSES_ROOT\MSIME.Taiwan\CurVer]
@="MSIME.Taiwan.8"

[HKEY_CLASSES_ROOT\MSIME.Taiwan.8]
@="IMTCCORE"

[HKEY_CLASSES_ROOT\MSIME.Taiwan.8\CLSID]
@="{F407D01A-0BCB-4591-9BD6-EA4A71DF0799}"

[HKEY_CLASSES_ROOT\CLSID\{F407D01A-0BCB-4591-9BD6-EA4A71DF0799}]
@="CHT Language model"

[HKEY_CLASSES_ROOT\CLSID\{F407D01A-0BCB-4591-9BD6-EA4A71DF0799}\InprocServer32]
@=hex(2):25,00,77,00,69,00,6e,00,64,00,69,00,72,00,25,00,5c,00,73,00,79,\
00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,69,00,6d,00,65,00,5c,00,69,00,\
6d,00,65,00,74,00,63,00,31,00,30,00,5c,00,69,00,6d,00,74,00,63,00,63,00,6f,\
00,72,00,65,00,2e,00,64,00,6c,00,6c,00,00,00
"ThreadingModel"="Apartment"

[HKEY_CLASSES_ROOT\CLSID\{F407D01A-0BCB-4591-9BD6-EA4A71DF0799}\ProgID]
@="MSIME.Taiwan.12"

[HKEY_CLASSES_ROOT\CLSID\{F407D01A-0BCB-4591-9BD6-EA4A71DF0799}\VersionIndependentProgID]
@="MSIME.Taiwan"

取注音字根的問題便解決了。

莫非......在 Windows Vista 平台上,必須安裝 Office 2007 才會註冊輸入法的 COM 元件,否則就得像上面那樣手動匯入 registry key?傑克,這真是太神奇了!

ImeLib 專案首頁:http://imelib.codeplex.com/
Copyright © 2012. Huan-Lin 學習筆記 - All Rights Reserved
Powered by Blogger
Template Design by Cool Blogger Tutorials
Published by Templates Doctor