SoFunction
Updated on 2025-03-04

Two ways to solve the problem of GBK garbled in URLs in Chinese

Two ways to solve the problem of GBK garbled in URLs in Chinese

Updated: June 3, 2014 11:10:39 Author:
UrlEncode processing of the URL, or the received data can be encoded and converted through iconv (utf-8, gb2312, $ret). Friends who need it can refer to it.
Generally, URLs are processed by UrlEncode, urlencode(), and urldecode();

The received data can also be encoded and converted by iconv('utf-8', 'gb2312', $ret).
  • URL
  • Chinese
  • GBK garbled code

Related Articles

  • PHP Day, Week, Monthly Click Ranking Statistics

    The principle is to first determine whether the date of the current article is the same as the month, day and week, and add 1 to the click count.
    2012-01-01
  • One article will help you master common file operations in PHP

    This article mainly introduces the relevant knowledge of common file operations in PHP in detail. The text sample code is explained in detail, which has certain reference value. Interested friends can follow the editor to learn it.
    2024-03-03
  • Two ways to update intermediate associated table data by PHP

    This article mainly introduces two methods of PHP to update intermediate related table data. It is more valuable when performing multi-table operations. Friends who need it can refer to it.
    2014-09-09
  • PHP function code that intercepts strings and preserves the complete xml tag

    Intercept the string and keep the php code of the complete xml tag. Friends who need it can refer to it.
    2013-02-02
  • Introduction to PHP5 polymorphism and dynamic binding

    This article mainly introduces the introduction of PHP5 polymorphism and dynamic binding. This article mainly explains what polymorphism is and what dynamic binding is, and gives corresponding examples. Friends who need it can refer to it.
    2015-04-04
  • php classic interesting algorithm example code

    Many people have written some interesting algorithms when learning C language. In fact, these algorithms can also be implemented in PHP. Some algorithms have even simpler codes than in C language. Friends who need them can refer to them.
    2020-01-01
  • Example writing of line breaks in php

    In this article, the editor will share with you the example writing method about line breaks in php. Friends who are learning PHP can refer to it.
    2019-09-09
  • PHP implementation json class instance

    This article mainly introduces the JSON class implemented by PHP, and analyzes the method of implementing JSON class in PHP. It has certain reference value. Friends who need it can refer to it.
    2015-07-07
  • Four PHP very practical features

    This article mainly introduces four very practical functions of PHP. Friends who need it can refer to it.
    2015-09-09
  • How to automatically obtain keywords in php

    This article mainly introduces the method of automatically obtaining keywords by php. It realizes the automatic acquisition function of keywords through the custom function tiqukeyword, which has certain reference value. Friends who need it can refer to it.
    2015-01-01

Latest Comments