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

  • Home
  • SEARCH
  • 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 7848619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:16:16+00:00 2026-06-02T18:16:16+00:00

Morning, A little advice sought here. Have a username column in a utf8-bin table.

  • 0

Morning,

A little advice sought here.

Have a username column in a utf8-bin table.

Want to keep case sensitivity on usernames for login but wish to perform a case-insensitive check on availability of username.

what issues surround using

CONVERT(`usrnm` USING latin1) #or other charset.

when dealing with something like chinese or arabic?

Any tips/thoughts/comments most welcome.

  • 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-06-02T18:16:19+00:00Added an answer on June 2, 2026 at 6:16 pm
    CREATE TABLE users (id INT NOT NULL PRIMARY KEY, usrnm VARCHAR(20) COLLATE UTF8_BIN);
    
    INSERT
    INTO    users
    VALUES  (1, 'Пользователь'); -- First letter in upper case
    
    SELECT  *
    FROM    users
    WHERE   usrnm = 'пользователь'; -- First letter in lower case, not returned
    
    
    SELECT  *
    FROM    users
    WHERE   usrnm COLLATE UTF8_GENERAL_CI = 'пользователь';  -- First letter in lower case, returned
    

    Note that if you want to ensure case-insensitive uniqueness, it’s better to make the column UTF8_GENERAL_CI and declare it UNIQUE:

    CREATE TABLE users (id INT NOT NULL PRIMARY KEY, usrnm VARCHAR(20) COLLATE UTF8_GENERAL_CI UNIQUE);
    
    INSERT
    INTO    users
    VALUES  (1, 'Пользователь');
    
    INSERT
    INTO    users
    VALUES  (2, 'пользователь'); -- unique violation
    
    SELECT  *
    FROM    users
    WHERE   usrnm = 'пользователь' COLLATE UTF8_BIN;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Getting a little confused here, not sure if its the monday morning blues! Its
Morning all. How are we? Excellent I hope. I have the following little bits
I have been messing around with this all morning, I know little to nothing
Morning - I'm having a little problem. I have an autocomplete extender textbox where
Good morning. I currently have this little rule in my .htaccess RewriteEngine On RewriteBase
I ran into something a little odd this morning and thought I'd submit it
Morning guys. Using C sharp .net4, and MS Visual Studio 2010. I have Developed
Morning, simple stupid question. I have found post with similar issues but after reading
Morning stackoverflow, I have a repeater, with the following code in my aspx page;
I've tried to look for an answer last night and a little this morning,

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.