{"id":35683,"date":"2005-05-09T08:56:30","date_gmt":"2005-05-09T08:56:30","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2005\/05\/09\/developing-a-chineseenglish-dictionary-introduction\/"},"modified":"2005-05-09T08:56:30","modified_gmt":"2005-05-09T08:56:30","slug":"developing-a-chineseenglish-dictionary-introduction","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20050509-30\/?p=35683\/","title":{"rendered":"Developing a Chinese\/English dictionary: Introduction"},"content":{"rendered":"<p>The other day, one of my colleagues mentioned that his English name &#8220;Ben&#8221; means &#8220;stupid&#8221; in Chinese: &#31528;\/b&egrave;n\/&#12549;&#12579;&#715;. (His wife is Chinese; that&#8217;s why he knows this in the first place.) Knowing that the Chinese language is rich in homophones, I fired up my Chinese\/English dictionary program to see if we could find anything better. (Unfortunately, the best I could come up with was &#36033;\/&#36146;\/b&#275;n\/&#12549;&#12579;, which means &#8220;energetic&#8221;.)\n Ben seemed to take his appellative fate in stride; he seemed much more interested in the little dictionary program I had written. So, as an experiment, instead of developing tiny samples that illustrate a very focused topic, I&#8217;ll develop a somewhat larger-scale program (though still small by modern standards) so you can see how multiple techniques come together. The task will take many stages, some of which may take only a day or two, others of which can take much longer. If a particular stage is more than two or three days long, I&#8217;ll break it up with other articles, and I&#8217;ll try to leave some breathing room between stages.\n Along the way, we&#8217;ll learn about owner-data (also known as &#8220;virtual&#8221;) listviews, listview custom-draw, designing for accessibility, window subclassing, laying out child windows, code pages, hotkeys, and optimization.\n If you&#8217;re going to play along at home, beware that you&#8217;re going to have to install Chinese fonts to see the program as it evolves, and when you&#8217;re done, you&#8217;ll have a Chinese\/English dictionary program, which probably won&#8217;t be very useful unless you&#8217;re actually studying Chinese&#8230;\n If you&#8217;re not into Win32 programming at all, then, well, my first comment to you is, &#8220;So what are you doing here?&#8221; And my second comment is, &#8220;I guess you&#8217;re going to be bored for a while.&#8221; You may want to <a href=\"http:\/\/www.feedster.com\/\">go read another blog<\/a> during those boring stretches, or just turn off the computer and go outside for some fresh air and exercise.<\/p>\n<p> Those who have decided to play along at home will need the following: a copy of <a href=\"http:\/\/www.mandarintools.com\/cedict.html\"> the CEDICT Chinese-English dictionary in Big5 format<\/a> (note: Big5 format) and the <a href=\"http:\/\/www.mandarintools.com\/zhcode.html\"> Chinese Encoding Converter<\/a> source code (all we need is the file <code>hcutf8.txt<\/code>). We&#8217;ll start digging in next time. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>The other day, one of my colleagues mentioned that his English name &#8220;Ben&#8221; means &#8220;stupid&#8221; in Chinese: &#31528;\/b&egrave;n\/&#12549;&#12579;&#715;. (His wife is Chinese; that&#8217;s why he knows this in the first place.) Knowing that the Chinese language is rich in homophones, I fired up my Chinese\/English dictionary program to see if we could find anything better. [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-35683","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>The other day, one of my colleagues mentioned that his English name &#8220;Ben&#8221; means &#8220;stupid&#8221; in Chinese: &#31528;\/b&egrave;n\/&#12549;&#12579;&#715;. (His wife is Chinese; that&#8217;s why he knows this in the first place.) Knowing that the Chinese language is rich in homophones, I fired up my Chinese\/English dictionary program to see if we could find anything better. [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/35683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=35683"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/35683\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=35683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=35683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=35683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}