function | Chinese Characters | graphics | display <?php
/******************************
How to display Chinese characters in PHP graphics function, 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), enter the three words, save As, select the encoding format, and then on the right side of the 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 stack 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.
To start editing the. php file, write it down in the format of Chr (0xe6). Chr (0x88), then assign to a variable, then output with the Imagettftext () function. What did you see?
If you do not see anything, then you need to look at the 16 of your 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, also need to use the other two tools, if can have a function directly to convert Chinese characters to Utf-8 code is better. Let's look for more information!
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.