Solved

How to convert UTF-8 3 byte to UTF-8 2 byte through PHP?

Posted on 2010-09-06
3
811 Views
Last Modified: 2012-05-10
Hello,

I need to know if there is a way to convert UTF-8 3 byte text to UTF-8 2 byte text through PHP.

Thanks in advance
0
Comment
Question by:jmhabis2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Expert Comment

by:darren-w-
ID: 33610884
0
 
LVL 12

Accepted Solution

by:
Rok-Kralj earned 500 total points
ID: 33613433
How do you even intend to do that? You can't transform 3 byte utf character to 2 byte utf character...

Define 3 byte text. UTF-8 is not a fixed size encoding, but rather variable size, that means that some characters are 1 byte, some 2 bytes, some even more.
0
 

Author Closing Comment

by:jmhabis2
ID: 33624925
The issue cannot be solved in this matter. Need to reconsider my approach
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question