This is a class packaged in Simplified and Traditional Chinese. Another two table files are needed: 1. http://www.jerry.com.tw/php/big5.map 2. http://www.jerry.com.tw/php/gb.map The program is as follows: CCharset.php3
//============= ======================================== // Programmer: Magic Jerry // // function Big5_Gb($str) => big5 to GB for string // function Gb_Big5($str) => GB to Big5 for string //== ================================================== = class CCharset {
var $gb_map="gb.map"; //If you want to put it in another path, add the complete path var $big5_map="big5.map" ; //For example="/home/table/gb.map
var $dep_char = 127;
//------------- -------------------------------------------------- -- function cbig5_gb($str,$fd) {
//====How to directly convert text string======== include("CCharset.php3"); $obj=new CCharset; $big5= "This is a big5 text string"; $tgb=$obj->Big5_Gb($big5); echo $tgb; //===> $tgb is the converted gb codeword String $tbig5=$obj->Gb_Big5($tgb); echo $tbig5; // Returned again: big5 //=========== =========================== ?>
< ? //If you convert web pages or files directly // Syntax http://your.domain.com.tw/this program.php3?http://Web page url or file to be transcoded // example: Convert Kimo homepage // http://your.domain.com.tw/this program.php3?http://www.kimo.com.tw/index.shtml // Note: If the following writing method encounters a web page that uses cookies, such as authenticating users, it may be kicked back and cause a login error. // Why? Think about it... @_@ include(" CCharset.php3"); $file=$QUERY_STRING; $fcontents = join( '', file( "$file" ) ); $fcontents=str_replace("", "", $fcontents); $code=new CCharset; $gb=$code->Big5_Gb($fcontents); echo $ gb; ?>
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
We teach you step by step how to convert USDTERC20 to TRC20 network. This is because many people like to move the USDT stablecoin from the Ethereum network to the Tron network to save on transaction fees. So, if you want to convert your ERC-20 tokens to TRC-20, I believe this tutorial will be helpful to you. The difference between ERC-20 and TRC-20 ERC-20 tokens and TRC-20 tokens represent tokens based on the Ethereum network and the Tron network respectively. There are some differences between the two networks, mainly in the following aspects: First, the Ethereum network often faces congestion and high gas fees, which may lead to transaction delays and high transaction costs. In comparison, the Tron network is relatively less congested
Practical tips for converting full-width English letters into half-width forms. In modern life, we often come into contact with English letters, and we often need to input English letters when using computers, mobile phones and other devices. However, sometimes we encounter full-width English letters, and we need to use the half-width form. So, how to convert full-width English letters to half-width form? Here are some practical tips for you. First of all, full-width English letters and numbers refer to characters that occupy a full-width position in the input method, while half-width English letters and numbers occupy a full-width position.
Golang time conversion: How to convert timestamp to string In Golang, time operation is one of the very common operations. Sometimes we need to convert the timestamp into a string for easy display or storage. This article will introduce how to use Golang to convert timestamps to strings and provide specific code examples. 1. Conversion of timestamps and strings In Golang, timestamps are usually expressed in the form of integer numbers, which represent the number of seconds from January 1, 1970 to the current time. The string is
AI files refer to vector graphics files created by Adobe Illustrator (AI for short) software, while CDR files refer to vector graphics files created by CorelDRAW software. Since these two softwares are developed by different manufacturers, their file formats are different and cannot be directly converted to each other. However, we can convert AI files to CDR files through some methods. A commonly used conversion method will be introduced below. Step 1: Export AI files to EPS format AdobeIllust
Converting a virtual machine (VM) to a physical machine is the process of migrating a virtual instance and associated application software to a physical hardware platform. This conversion helps optimize operating system performance and hardware resource utilization. This article aims to provide an in-depth look at how to make this conversion. How to implement migration from virtual machine to physical machine? Typically, the conversion process between a virtual machine and a physical machine is performed outside the virtual machine by third-party software. This process consists of multiple stages involving the configuration of virtual machines and the transfer of resources. Prepare the physical machine: The first step is to ensure that the physical machine meets the hardware requirements for Windows. We need to back up the data on a physical machine as the conversion process will overwrite the existing data. *Username and password for an administrator account with administrator rights to create system images. will be virtual
This article will introduce in detail how to convert months in PHP to English months, and give specific code examples. In PHP development, sometimes we need to convert digital months to English months, which is very practical in some date processing or data display scenarios. The implementation principles, specific code examples and precautions will be explained in detail below. 1. Implementation principle In PHP, you can convert digital months into English months by using the DateTime class and format method. Date
In this article, we will show you how to convert OpenDocumentTextDocument (ODT) files to Microsoft Word (Docx, DOC, etc.). Format. How to Convert ODT to Word in Windows 11/10 Here is how you can convert ODT documents to DOC or DOCX format on Windows PC: Convert ODT to Word using WordPad or Word The first method we are going to show you Is to use WordPad or MicrosoftWord to convert ODT to Word. Here are the steps to achieve this: First, open the WordPad app using the Start menu. Now, go to
How to convert full-width English letters into half-width letters In daily life and work, sometimes we encounter situations where we need to convert full-width English letters into half-width letters, such as when entering computer passwords, editing documents, or designing layouts. Full-width English letters and numbers refer to characters with the same width as Chinese characters, while half-width English letters refer to characters with a narrower width. In actual operation, we need to master some simple methods to convert full-width English letters into half-width letters so that we can process text and numbers more conveniently. 1. Full-width English letters and half-width English letters