displaying Chinese characters in PHP's graphical functions
Source: Internet
Author: User
function | Chinese Character | figure | show how to display Chinese characters in PHP graphics functions, we have been asking for a long time, but there has been no results. Finally in the reference to another article, I tried it out!
Method:
first, decide which characters to display, such as the "counter" three words.
to Word2000 (97 do not know) to go, enter the three words, save As, select the encoding format, and then in the right encoding type to select Unicode Utf-8, remember not to choose the wrong. A text file that is stored in a coded format, such as a file named Test.txt.
Open this file with a 16-in editor, and you'll see that there's a bunch of 16 characters in it and a Chinese character for three bytes, so here you should find the 9 bytes in front and write it down.
then starts editing the. php file, written in the format of Chr (0xe6). Chr (0x88), then assigns a variable, then outputs the Imagettftext () function. What did you see?
If you do not see anything, then you need to look at your 16 code is correct, of course, display the font files required for Chinese characters you have to copy to the appropriate location Oh! My program uses the italics that Windows brings.
but this is still very troublesome, after all, still need to use the other two tools, if you can have a function directly to convert Chinese characters into Utf-8 code is better. Let's look for more information!
This string of utf-8 strings means "I love you!" "Hee, don't say I'm disgusting!"
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service