Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6678665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:16:11+00:00 2026-05-26T04:16:11+00:00

I’ve looked all over the web only to find ways to make searches insensitive

  • 0

I’ve looked all over the web only to find ways to make searches insensitive to diacritic characters, but I need the opposite.

In my situation I need to be able to compare specifically symbols with superscript and subscript dots (i.e. ȧ & ạ) and some other more common acents (á, ã, etc), but these letters might be anything (ṡ, ṛ, ṫ, ḍ, ṅ, etc). The desired result would work like this: if I search for “a” I receive “a” only, and if I search for “ȧ”, I receive “ȧ” only as a result and not “a” along with it (without the dot).

I’ve read that I need to use utf8_bin and have tried changing both my field collations, table collations and database collations to that with no success. Here’s the code:

// "sound" is being passed in by an AJAX call 
$sound = $_POST['sound'];

$query = "SELECT * FROM sounds WHERE 'sound' = '$sound'";
$result = mysql_query($query);

// This is then sent back to my page.

I’ve also looked into COLLATE with little success. I’m probably misunderstanding its prober usage:

// Attempting to covert the searched string into the utf8_bin format to match my db collations
$query = "SELECT * FROM sounds WHERE 'sound' = '$sound' COLLATE utf8_bin";

When I use utf8_general_ci or utf8_unicode_ci I get the excepted result of “a” or “ȧ” returning both “ȧ” and “a”. However, If I use utf8_bin I get nothing when searching for either of these. I believe this is because in my database when using utf8_bin this – “ṅ(PH)” (one of my entries) – gets converted to this – “e1b98528504829”. So Is there a way of converting my searches to that same format before querying them? Or just an all around better way of making this work?

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:16:12+00:00Added an answer on May 26, 2026 at 4:16 am

    Okay, with a little help from a friend I got it working. Turns out it works just fine with utf8_general_ci collations as well.

    My first issue was with how I had entered my data into my database. I had used phpMyAdmin to do this, which for some reason didn’t encode the data properly and all my bins were turning out wrong. This was fixed by just writing my own sql to enter the values.

    Second, I ended up using the PHP function iconv() to encode the data coming from the web page. These two solutions put together got matching values and the entire script works great.

    Thanks all for the help and suggestions… really appreciated, and believe me, did not go to waste. I spent a long time fiddling with all of them.

    Cheers!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
I need to clean up various Word 'smart' characters in user input, including but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I have a text area in my form which accepts all possible characters from
I need a function that will clean a strings' special characters. I do NOT
Let's say I'm outputting a post title and in our database, it's Hello Y’all
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a French site that I want to parse, but am running into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.