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 4046536
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:34:32+00:00 2026-05-20T13:34:32+00:00

I set all character set as utf8 in pages, I set all collation (also

  • 0

I set all character set as “utf8” in pages, I set all collation (also fields collation) as utf8_general_ci in database, and I add this code in connect.php

mysql_set_charset('utf8',$connect);
mysql_query("SET NAMES 'utf8'");

Although everything is utf, when i run this query:

"SELECT * FROM titles WHERE title='toruń'"

Result: it returns “toruń” and “torun” which’s are different words.

So what do you think?
What is the problem?

Thanks!

EDIT:

CREATE TABLE IF NOT EXISTS titles
(
id int(11) NOT NULL AUTO_INCREMENT,
title varchar(255) NOT NULL,
PRIMARY KEY (id),
KEY title (title),

) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=37 ;

  • 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-20T13:34:33+00:00Added an answer on May 20, 2026 at 1:34 pm

    The problem is that the collation you have chosen is designed to ignore that particular accent (and, most likely, accents in general).

    If you expect to be storing a particular language, rather than a number of different languages, try using utf8_(language)_ci (if that language is not present, there might be another language which is similar to yours). Otherwise, you could try utf8_unicode_ci, which uses the Unicode Collation Algorithm, but I’m not sure if that one makes this distinction.

    You can also use utf8_bin, which is guaranteed to consider them different, but that comes at the expense of losing case insensitivity, which is most likely worse.

    Having said that, this is not necessarily a bad thing: by ignoring the accents, the search will be more flexible, and easier to use for people who are unable to type a specific character.

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

Sidebar

Related Questions

i want to include design in all pages, for this i had set a
I've created database, for example 'mydb'. CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_bin;
In iTextSharp is there a way to set ALL fields on a form to
Is it good practice to set all text fields to nvarchar(MAX)? if im not
Looking to have a database query set all the instance variables in a class:
There's a shortcut to this without having to specify SET all the time right?
How can I set all images in one line and display only the first
I would like to SET ALL permissions to True for all users of a
Is there a way to automatically/dynamically set all the attributes for a datamapper object
I have Visual Studio 2003 project and I have set all of the AssemblyInfo

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.