⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gbkcode.html

📁 GBK码的分析
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<title>gbkcode——有关GBK代码及汉字处理的一些C函数</title>
<style type="text/css">
<!--
H1 {
	text-align: center;
	font-family: Arial, Helvetica, sans-serif;
}
H2 {
	font-family: Geneva, Arial, Helvetica, sans-serif;
}
CAPTION { font-weight: bold }
A.qindex {}
A.qindexRef {}
A.el { text-decoration: none; font-weight: bold }
A.elRef { font-weight: bold }
A.code { text-decoration: none; font-weight: normal; color: #4444ee }
A.codeRef { font-weight: normal; color: #4444ee }
A:hover { text-decoration: none; background-color: #f2f2ff }
DL.el { margin-left: -1cm }
DIV.fragment {
	width: 98%;
	border: 1px solid #CCCCCC;
	background-color: #f5f5f5;
	padding-left: 4px;
	margin: 4px;
}
DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
TD.md { background-color: #f2f2ff; font-weight: bold; }
TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; }
TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; }
DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }
DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }
BODY {
	background: #FFFFD0;
	color: black;
	margin-right: 20px;
	margin-left: 20px;
}
TD.indexkey { 
   background-color: #eeeeff; 
   font-weight: bold; 
   padding-right  : 10px; 
   padding-top    : 2px; 
   padding-left   : 10px; 
   padding-bottom : 2px; 
   margin-left    : 0px; 
   margin-right   : 0px; 
   margin-top     : 2px; 
   margin-bottom  : 2px  
}
TD.indexvalue { 
   background-color: #eeeeff; 
   font-style: italic; 
   padding-right  : 10px; 
   padding-top    : 2px; 
   padding-left   : 10px; 
   padding-bottom : 2px; 
   margin-left    : 0px; 
   margin-right   : 0px; 
   margin-top     : 2px; 
   margin-bottom  : 2px  
}
TR.memlist {
   background-color: #f0f0f0; 
}
P.formulaDsp { text-align: center; }
IMG.formulaDsp { }
IMG.formulaInl { vertical-align: middle; }
SPAN.keyword       { color: #008000 }
SPAN.keywordtype   { color: #604020 }
SPAN.keywordflow   { color: #e08000 }
SPAN.comment       { color: #800000 }
SPAN.preprocessor  { color: #806020 }
SPAN.stringliteral { color: #002080 }
SPAN.charliteral   { color: #008080 }
.mdTable {
	border: 1px solid #868686;
	background-color: #f2f2ff;
}
.mdRow {
	padding: 8px 20px;
}
.mdescLeft {
	font-size: smaller;
	font-family: Arial, Helvetica, sans-serif;
	background-color: #FAFAFA;
	padding-left: 8px;
	border-top: 1px none #E0E0E0;
	border-right: 1px none #E0E0E0;
	border-bottom: 1px none #E0E0E0;
	border-left: 1px none #E0E0E0;
	margin: 0px;
}
.mdescRight {
	font-size: smaller;
	font-family: Arial, Helvetica, sans-serif;
	font-style: italic;
	background-color: #FAFAFA;
	padding-left: 4px;
	border-top: 1px none #E0E0E0;
	border-right: 1px none #E0E0E0;
	border-bottom: 1px none #E0E0E0;
	border-left: 1px none #E0E0E0;
	margin: 0px;
	padding-bottom: 0px;
	padding-right: 8px;
}
.memItemLeft {
	padding: 1px 0px 0px 8px;
	margin: 4px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-top-color: #E0E0E0;
	border-right-color: #E0E0E0;
	border-bottom-color: #E0E0E0;
	border-left-color: #E0E0E0;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	background-color: #FAFAFA;
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.memItemRight {
	padding: 1px 0px 0px 8px;
	margin: 4px;
	border-top-width: 1px;
	border-right-width: 1px;
	border-bottom-width: 1px;
	border-left-width: 1px;
	border-top-style: solid;
	border-top-color: #E0E0E0;
	border-right-color: #E0E0E0;
	border-bottom-color: #E0E0E0;
	border-left-color: #E0E0E0;
	border-right-style: none;
	border-bottom-style: none;
	border-left-style: none;
	background-color: #FAFAFA;
	font-family: Geneva, Arial, Helvetica, sans-serif;
	font-size: 13px;
}
-->
</style>
</head>
<body>
        <h1>gbkcode——有关GBK代码及汉字处理的一些C函数</h1>
<h2>简介</h2>
<p>
这是本人编制的一些代码,其中包含有详细的数据以及配以相关的函数。<br>
使用这些函数可以做到: <br>
 1) GBK代码转换为BIG5代码 <br>
 2) GBK代码转换为UNICODE代码 <br>
 3) 取得一个汉字的拼音(包括可能的多种读音) <br>
 4) 取得一个汉字的笔画数 <br>
 使用方法:<br>
 将gbkcode.c添加到你的C/C++程序的工程之中,在你需要用到这些函数的C/C++程序前包含gbkcode.h头文件。<br>
 <b>注:</b>本人在大约1999年时编制了这些代码,现在许多东西有可能已经过时。
<h2>注意</h2>
你可以无偿地在任何情况下使用这些代码,同时本人亦不对此代码承担任何义务、也不保留任何权利。<br>


<table border=0 cellpadding=0 cellspacing=0>
<tr><td></td></tr>
<tr><td colspan=2><br><h2>函数</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="#a0">char_gbk2big5</a> (unsigned code, char *output)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">GBK字符到BIG5的转换.</em> <a href="#a0"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="#a1">char_gbk2unicode</a> (unsigned code, char *output)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">GBK字符到UNICODE的转换.</em> <a href="#a1"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="#a2">gbkbihua</a> (unsigned code)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">取得GBK汉字的笔画数</em> <a href="#a2"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="#a3">gbkpinyin</a> (unsigned code, char *out, int index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">取得GBK汉字的拼音</em> <a href="#a3"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="#a4">file_gbk2big5</a> (char *infile, char *outfile, char *notfound)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">将GBK码的文件转换成BIG5的</em> <a href="#a4"></a><em><br><br></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>int&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="#a5">file_gbk2unicode</a> (char *infile, char *outfile)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">将GBK码的文件转换成UNICODE的</em> <a href="#a5"></a><em><br><br></td></tr>
</table>
<hr><h2>函数文档</h2>
<a name="a0" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top"> int char_gbk2big5 </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned&nbsp;</td>
          <td class="mdname" nowrap> <em>code</em>, </td>
        </tr>
        <tr>
          <td></td>
          <td></td>
          <td class="md" nowrap>char *&nbsp;</td>
          <td class="mdname" nowrap> <em>output</em></td>
        </tr>
        <tr>
          <td></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>&nbsp;
      
    </td>
    <td>

<p>
GBK字符到BIG5的转换.
<p>
<dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign=top><em>code</em>&nbsp;</td><td>GBK代码 </td></tr>
    <tr><td valign=top><em>output</em>&nbsp;</td><td>输出的BIG5字符,应该预留好足够空间,至少3个字符的大小。 </td></tr>
  </table>
</dl>
<dl compact><dt><b>返回:</b></dt><dd>成功返回0, 失败返回非零 </dd></dl>
    </td>
  </tr>
</table>
<a name="a1" ></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -