ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am playing with some chinese characters and would like to find a specific character to split the text into 2 strings.For example,"你／我" will become 2 strings,str1=你,str2=我.However,it doesn't seem to react correctly if I grab the text from the web and then do the search with strpos or preg_match.It does the trick if I copy and paste those words to my php page.I doubt that is the problem with encoding.But I don't know exactly how I solve this.
Do you guys have any clue?Please drop me a line if you do.
Maybe you need to convert the page you got from a website from BIG-5 encoding to UTF-8? I don't even know what BIG-5 is, but I've used the iconv function in similar situations to convert everything to UTF-8, before doing stuff with the mbstring functions.
I have just rewritten the code like you said.Fortunately,it can detect the special character with mb_strpos after I used mb_convert_encoding to UTF-8 from BIG-5.It's better than iconv as I used it.However,it's not successfully completed the task after I used mb_split.The first part of string is successful but the second part become monster code.I guess that the mb_split is not fully successful to split out the string.As the manual said,if the split process failed,like the character cannot get all the bytes information which it needed,the output character will become monster code.
I do think the trouble of multibyte characters is the biggest problem I found in PHP.