Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can not search Chinese input in database.


cn000

Recommended Posts

I am using Chinese simplified gb2312 on my site. But I have issue with search chinese input. When I switched to English iso-8859-1, the search works fine. I think it might be the mySQL database is using UTF-8. I tried a lot of ways to convert the chinese input to UTF-8.. But no success. Can anyone provide some information on this?

 

My question is

 

1. How can I convert the chinese input to something database would recongnize?

2. Do I need to change the database, although this is the last thing I want to do?

 

 

Much appreciated.

 

Thanks.

Link to comment
Share on other sites

  • 7 months later...
I am using Chinese simplified gb2312 on my site. But I have issue with search chinese input. When I switched to English iso-8859-1, the search works fine. I think it might be the mySQL database is using UTF-8. I tried a lot of ways to convert the chinese input to UTF-8.. But no success. Can anyone provide some information on this?

 

My question is

 

1. How can I convert the chinese input to something database would recongnize?

2. Do I need to change the database, although this is the last thing I want to do?

Much appreciated.

 

Thanks.

 

Is anyone found the solution on this?

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 year later...
  • 3 weeks later...
  • 1 month later...
I am using Chinese simplified gb2312 on my site. But I have issue with search chinese input. When I switched to English iso-8859-1, the search works fine. I think it might be the mySQL database is using UTF-8. I tried a lot of ways to convert the chinese input to UTF-8.. But no success. Can anyone provide some information on this?

 

My question is

 

1. How can I convert the chinese input to something database would recongnize?

2. Do I need to change the database, although this is the last thing I want to do?

 

 

Much appreciated.

 

Thanks.

 

My opinion:

 

1. utf-8 standard contains gb2312 standard? If it is not it is very difficult. You have to make an input-output encoder from gb2312 to utf-8 and versus. Probably the typed characters into search field not equals the utf-8 charset definitions in html area.

Get an gb2312 codepage and utf-8 hexa converter.

 

 

2. Have you translated english/ISO-8859-1 products name to chinese/gb2312 language or do you use only english names?

If not, translate and have to work. When you make translate use gb2312 charset in your browser and better you use compatible keyboard. Chinese area probably use gb2312 keyboard sets and they couldn't type in the correct characters. It could be differencies.

 

 

3. Get typed characters!

 

Get a mail with gb2312 charset for example tell-e friend and look at the hexa codes of characters. Make a comparation with utf-8 characters hexa codes and gb2312 letter character codes. Concentrate only iso-8859-1 charsets. If it differents you need to encode.

 

In the recived mail you can make a pair to typed characters. A= ; B=; ...... to the end of ISO-8859-1 charset between gb2312 charset typed characters hexa codes.

 

I have just similar problems to make osC3 translations in mail sending process. Try to see the better ISO/UTF-8 mail 1.0 contrib. In the mail.php you can see an database table nativ special_encoder and mail hexa fisher. I dont use it now, because I find a better ways to solve in 2.0. In my future plain I would like to do an SQL file translate encoder for osc. It would be good every same problems. See you later if you cant solve.

:blink:
osCommerce based shop owner with minimal design and focused on background works. When the less is more.
Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...