CSDN首页 空间 新闻 论坛 Blog 下载 读书 网摘 搜索 .NET Java 视频 接项目 求职 在线学习 买书 程序员 通知
不看会后悔的Windows XP之经验谈 简单快捷DIY实用家庭影院
CSDN社区
搜索 收藏 打印 关闭
CSDN社区 >  Delphi >  数据库相关

如何将繁体中文转换为简体中文

楼主swww(风)2006-05-03 20:57:44 在 Delphi / 数据库相关 提问

比何在一Edit中输入为繁体中文  
  程序自动判断后将其转为简体  
  有没有这方面的资料?  
  留个地址  
  或发到sw6622113@21cn.com  
  谢了 问题点数:100、回复次数:3Top

1 楼postren(小虫【宝宝出生,真忙】)回复于 2006-05-03 21:39:58 得分 0

参考:  
  http://community.csdn.net/Expert/topic/4704/4704819.xml?temp=.9637873Top

2 楼jiangsheng(蒋晟.Net[MVP])回复于 2006-05-04 00:49:36 得分 0

There   is   a   limited   version   of   the   functionality   on   NT-based   platforms,   in   the   LCMapStringW   API   (note   that   the   LCMapStringA   API   should   not   be   used   here,   for   hopefully   obvious   reasons   <grin>).    
   
  But   the   work   done   in   Microsoft   Word   2000   and   later   is   much   more   functional   as   it   is   dictionary   based   and   covers   a   wider   range   of   ideographs.    
   
  BTW,   the   API   function   can   not   be   relied   on   -   there   is   no   general   one-to-one   mapping   from   traditional   to   simplified   chinese   characters.   This   is   particularly   true   going   from   simplified   to   traditional   where   there   might   be   any   number   of   traditional   characters   that   correspond   to   a   single   simplified   character   -   that   is   the   nature   of   the   way   the   PRC   simplification   was   done.   As   a   consequence   you   need   to   use   dictionary-based   conversion   to   be   sure   to   get   it   right   most   of   the   time   -   even   then   there   could   be   errors   without   manual   checking.   A   comprehensive   SC-TC   dictionary   should   include   millions   of   terms.  
   
  See   also  
  http://www.basistech.com/knowledge%2Dcenter/#chinese  
  http://www.cjk.org/cjk/reference/chinvar.htm   Orthographic   Variation   in   Chinese   -   Jack   Halpern,   The   CJK   Dictionary   Institute,   Inc.,   good   explanation   of   the   challenge    
  http://www.cjk.org/cjk/c2c/c2cbasis.htm   The   Pitfalls   and   Complexities   of   Chinese   to   Chinese   Conversion]  
  http://www.mandarintools.com/faq.html   Mandarintools.com   -   FAQ   on   Chinese   on   computers  
  http://zh.wikipedia.org/wiki/Help:%E4%B8%AD%E6%96%87%E7%BB%B4%E5%9F%BA%E7%99%BE%E7%A7%91%E7%9A%84%E7%B9%81%E7%AE%80%E5%A4%84%E7%90%86   Help:中文维基百科的繁简处理  
   
   
  Top

3 楼xuzhenhu()回复于 2006-05-04 11:53:03 得分 0

function   Big52GB(BIG5Str   :   String):   AnsiString;  
  {进行big5转GB内码}  
  var  
      Len:   Integer;  
      pBIG5Char:   PChar;  
      pGBCHSChar:   PChar;  
      pGBCHTChar:   PChar;  
      pUniCodeChar:   PWideChar;  
  begin  
          //String   ->   PChar  
          pBIG5Char   :=   PChar(BIG5Str);  
          Len   :=   MultiByteToWideChar(950,0,pBIG5Char,-1,nil,0);  
          GetMem(pUniCodeChar,Len*2);  
          ZeroMemory(pUniCodeChar,Len*2);  
          //Big5   ->   UniCode  
          MultiByteToWideChar(950,0,pBIG5Char,-1,pUniCodeChar,Len);  
          Len   :=   WideCharToMultiByte(936,0,pUniCodeChar,-1,nil,0,nil,nil);  
          GetMem(pGBCHTChar,Len*2);  
          GetMem(pGBCHSChar,Len*2);  
          ZeroMemory(pGBCHTChar,Len*2);  
          ZeroMemory(pGBCHSChar,Len*2);  
          //UniCode->GB   CHT  
          WideCharToMultiByte(936,0,pUniCodeChar,-1,pGBCHTChar,Len,nil,nil);  
          //GB   CHT   ->   GB   CHS  
          LCMapString($804,LCMAP_SIMPLIFIED_CHINESE,pGBCHTChar,-1,pGBCHSChar,Len);  
          Result   :=   String(pGBCHSChar);  
          FreeMem(pGBCHTChar);  
          FreeMem(pGBCHSChar);  
          FreeMem(pUniCodeChar);  
  end;Top

相关问题

关键词

得分解答快速导航

  • 帖主:swww

相关链接

  • Delphi类图书
  • Delphi类源码下载
  • Delphi控件下载

广告也精彩

反馈

请通过下述方式给我们反馈
反馈
提问
网站简介|广告服务|VIP资费标准|银行汇款帐号|网站地图|帮助|联系方式|诚聘英才|English|问题报告
北京创新乐知广告有限公司 版权所有, 京 ICP 证 070598 号
世纪乐知(北京)网络技术有限公司 提供技术支持
Copyright © 2000-2008, CSDN.NET, All Rights Reserved
GongshangLogo