How to solve the simple and traditional conversion of php
Source: Internet
Author: User
Hello, everyone! I have some database content that needs to be searched, but the Chinese content in it is both simplified and traditional. if you search directly using the content entered by the user, it will inevitably be omitted, therefore, I want to convert the search characters entered by the user. for example, if the simplified one is converted to the traditional one, the traditional one is converted to the simplified one, and then the two types of content can be searched together, in this way, php's simplified and traditional conversion will not be left behind.
Hello everyone! I have some database content that needs to be searched, but the Chinese content in it is both simplified and traditional. if you search directly using the content entered by the user, it will inevitably be omitted, therefore, I want to convert the search characters entered by the user. for example, if the simplified one is converted to the traditional one, the traditional one is converted to the simplified one, and then the two types of content can be searched together, in this way, there will be no omissions.
However, I searched the internet and did not find any new simple and practical things. do you have any good solutions? For example, a function or something? It is also worth mentioning that all of my data content is UTF-8 encoded. do you know if this is the case?
Thank you!
------ Solution --------------------
You must query the simplified word table.
------ Solution --------------------
Let's take a look at the simplified word summary table and then you will know how to do it.
------ Solution --------------------
No simple method
You can go over the wall to see this
Http://zh.wikipedia.org/zh/%E7%B9%81%E7% AE %80%E8%BD%AC%E6%8D%A2
------ Solution --------------------
Use javascript.
------ Solution --------------------
I also want to know how to use javascript?
------ Solution --------------------
Mb_convert_encoding () to see this function
------ Solution --------------------
I have simplified and traditional conversion classes that I have previously written and converted into pinyin !~~ Contact me if you want!
------ Solution --------------------
Heyc1998: open source?
Can it be placed in the resource download area?
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