Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP Manual > unicode_encode - Convert a unicode string in any encoding





ลองใช้ค้นหาข้อมูล


   
Bookmark.

unicode_encode

(No version information available, might be only in CVS)

unicode_encodeConvert a unicode string in any encoding

Description

string unicode_encode ( unicode $input , string $encoding [, int $errmode ] )

Takes a unicode string and converts it to a string in the specified encoding .

Parameters

input

The unicode string that is converted.

encoding

The new encoding for input .

errmode

Conversion error mode. This parameter determines the action to take when the converter cannot convert a character. For a list of available modes, refer to unicode_set_error_mode(). If the parameter is not set, the global error mode is used.

Return Values

A string on success, or FALSE on failure.

Errors/Exceptions

Emits a E_WARNING level error if a converter cannot be created for the desired encoding .

Examples

Example #1 A unicode_encode() example

Note: The characters will be seen instead of entities in the output.

<?php
header 
('Content-Type: text/plain; charset=ISO-8859-2');

$encoded unicode_encode ('\u0150\u0179''ISO-8859-2');

echo 
'Unicode semantics: 'ini_get ('unicode_semantics'), PHP_EOL;
echo 
'The string itself:'$encodedPHP_EOL;
echo 
'The length of the string: 'strlen ($encoded);
?>

The above example will output something similar to:

Unicode semantics: 1
The string itself: &#336;&#377;
The length of the string: 2

Notes

Warning

This function is EXPERIMENTAL. The behaviour of this function, its name, and surrounding documentation may change without notice in a future release of PHP. This function should be used at your own risk.

See Also



ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 04
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่