TA的每日心情 | 开心 2021-12-13 21:45 |
---|
签到天数: 15 天 [LV.4]偶尔看看III
|
PS:昨天偶然去王码的官网,发现大一统12年发布过一个普及版,试了一下,感觉把重码、容错、联想关闭以后非常流畅好用,除了关闭光标跟随没经典微软五笔自然外,基本又找回来以前的输入感觉,而且加入了一些方便功能,比如编码、拼音、字根拆分提示、符号输入等。然后我就卸载了QQ五笔,希望对喜欢五笔又存在和我一样问题的朋友试用,网址:http://www.wangma.com.cn/wb2012/
=============原文正文=============
公司换64位新电脑后,装了64位Win7,用了多年的微软版王码五笔98版基本不兼容了,非常不方便。
试用了段小鸭五笔,最后还是怀念那个经典的小词库,基本不用选词,可以不选择光标跟随,打字有随心所欲的感觉,不受任何干扰。
今天换了QQ的输入法,决定还是自己动手,把那个词库转换成QQ五笔支持的格式。
步骤如下:
1、使用Imegen将WINWB98W.MB转换成TXT格式;
2、通过程序将1生成的TXT文件转换为QQ五笔支持的格式;
3、将2生成的TXT文件导入QQ五笔词库即可。
因为blog传附件不文件,我把最终结果直接贴在这里,需要的可以直接copy存下来,最后会附上转换程序。
转换程序(C#):
- using System;
- using System.Collections.Generic;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MBTXT2QQTXT
- {
- class Program
- {
- static void Main(string[] args)
- {
- // 读入流
- String mbTxtFile = @"C:\Users\liyj.BJ\Desktop\imegen\WINWB98W.TXT";
- FileStream fsIn = new FileStream(mbTxtFile, FileMode.Open);
- StreamReader sr = new StreamReader(fsIn);
- // 写出流
- String qqTxtFile = @"C:\Users\liyj.BJ\Desktop\imegen\QQTXT.txt";
- StreamWriter sw = new StreamWriter(qqTxtFile);
- if (!File.Exists(qqTxtFile))
- {
- //不存在就新建一个文本文件,并写入一些内容
- sw = File.CreateText(qqTxtFile);
- }
- //
- // 读行并检测首个英文字符,截取两段,写入文件
- //
- String line = sr.ReadLine();
- int count = 0;
- String resultStr = null;
- while (line != null)
- {
- int pos = checkStr(line);
- if (pos == -1) pos = 0;
- String chSubStr = line.Substring(0, pos);
- String enSubStr = line.Substring(pos);
- resultStr = enSubStr + " " + chSubStr;
- // 写出
- sw.WriteLine(resultStr);
- line = sr.ReadLine();
- count++;
- }
- // 写出
- resultStr = "========= 共导出 " + count + " 条词条 ===========";
- sw.WriteLine(resultStr);
- sw.Close();
- Console.WriteLine("OK!");
- Console.ReadKey();
- }
- /// <summary>
- /// 检查此行首个英文字母位置
- /// </summary>
- /// <param name="str"></param>
- /// <returns></returns>
- static int checkStr(String str)
- {
- int pos = -1;
- char[] enArr = new char[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
- for (int i = 0; i < str.Length; i++)
- {
- foreach (char c in enArr)
- {
- if (c == str[i])
- {
- pos = i;
- goto L;
- }
- }
- }
- L:
- return pos;
- }
- }
- }
复制代码
北京 京润水上花园别墅
2013/2/2 PM 12:06
|
|