Tag:GB2312

  • Xmlhttp garbled code relatively complete solution (utf8, GB2312 encoding and decoding)

    Time:2022-4-30

    There are two reasons for the form garbled code when using xmlhttp # post # form – Chinese garbled code when using post form data; The server response is garbled due to incorrect encoding of xmlhttp. In other words, this paper mainly solves two problems – how to correctly post Chinese content and how to […]

  • The code is GB2312, so that the data received by Ajax can be displayed in Chinese

    Time:2021-12-22

    Copy codeThe code is as follows: <script> var xmlHttp; var BrowerType=”ie”; function createXML(){ try{ xmlHttp = new ActiveXObject(“Msxml2.XMLHTTP”); } catch (e){ try{ xmlHttp = new ActiveXObject(“Microsoft.XMLHTTP”); }catch(e2) { xmlHttp =false; } } if (!xmlHttp && typeof XMLHttpRequest != ‘undefined’){ xmlHttp = new XMLHttpRequest(); BrowerType = “ff”; // It is used to record whether Firefox is […]

  • Code conversion from Java Big5 to GB2312

    Time:2021-8-12

    package com.Big5ToUTF8; import java.io.*; public class Big5Tran { private static final String tabFile =”bg-gb.tab”; private static byte[] data; static{ try{ FileInputStream fis =new FileInputStream(tabFile); int len =fis.available(); data =new byte[len]; fis.read(data); fis.close(); }catch(Exception ex){ ex.printStackTrace(); System.exit(1); } } /** *Get the offset of Big5 Chinese character big in data*/ private static int indexOf(int big){ int […]

  • VBS implementation GB2312, UTF-8, Unicode, Big5 code conversion tool

    Time:2020-1-25

    DemonstrationEcho “ABCDE &! @ # $^ < > ()%% ABCDE test! “> before processing.txt“Gb2ue.vbs “before processing. TXT” “after processing. TXT”Ue2u8.vbs “after processing. TXT”U82gb.vbs “after processing. TXT”Gb2u8.vbs “after processing. TXT”U82ue.vbs “after processing. TXT”Ue2gb.vbs “after processing. TXT”@Echo after 6 times of processing “after processing. TXT” and “before processing. TXT” are still the same codeIf you do not […]

  • Code of converting GB2312 to unicode in vbs

    Time:2019-12-6

    Today, I wrote a program similar to the following: Copy codeThe code is as follows: Dim http Set http = CreateObject(“msxml2.xmlhttp”) http.open “GET”,”http://www.sina.com.cn/”,False http.send WScript.Echo http.responseText But I found that the returned Chinese was all garbled. After a look, I found that Sina’s code was GB2312, Khan, and now it’s the era of UTF-8 code. […]

  • Introduction to the Differences and Relations between UTF-8 GBK UTF8 GB2312

    Time:2019-9-24

    UTF-8 contains all the characters that need to be used in all countries of the world. It is an international code with strong universality. UTF-8 coded text can be displayed in browsers that support UTF8 character sets in various countries. For example, if UTF8 is encoded, Chinese can also be displayed on the English IE […]

  • Detailed introduction of GB2312

    Time:2019-9-7

    Essential information The Chinese Character Coding Set for Information Exchange was issued by the General Administration of National Standards in 1980 and implemented on May 1, 1981.The standard number is GB 2312-1980. It is a computer recognizable encoding, suitable for information exchange between Chinese character processing, Chinese character communication and other systems. The basic set […]

  • Summary of methods for converting encoding from GB2312 to UTF-8 (from the front desk, program, database)

    Time:2019-7-14

    If a website needs to be internationalized, it needs to convert the coding from GB2312 to UTF-8. There are many problems to be noted. If there is no thorough conversion, there will be many coding problems!There are five main aspects:I. HTML page to UTF-8 encoding problemII. PHP page to UTF-8 encoding problem3. The use of […]