Skip to content

将GBK,UTF8字符串转化为Unicode编码的类库——php string to unicode and unicode to gbk or utf-8

Notifications You must be signed in to change notification settings

JackBuh/PHP-Unicode-Convert

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

<?php
/**
 *  Demo
 * 
 * @author wang chong(wangchong1985@gmail.com)
 * @link http://www.wangchong.org
 * @version 1.0.0 (2011-04-15)
 * @package php-Unicode
 */

include 'unicode.class.php';

$str = '这是一个测试Demo!~!wangchong1985@gmail.com';

$convert = new Unicode();

//convert to Unicode
var_dump($str = $convert->str_to_unicode($str, 'UTF-8'));

//convert to UTF-8
var_dump($str = $convert->str_from_unicode($str, 'UTF-8'))

About

将GBK,UTF8字符串转化为Unicode编码的类库——php string to unicode and unicode to gbk or utf-8

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • PHP 100.0%