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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T01:24:04+00:00 2026-06-17T01:24:04+00:00

In my database i have translation table which contains dictionary for converting unusual Unicode

  • 0

In my database i have translation table which contains dictionary for converting unusual Unicode characters to english character. Unicode character is primary key of this table.
And some time ago i faced an issue: some different Unicode characters are the same for T-SQL and they are equal to nothing at the same time.

I can find the way do distinguish one from another (‘=’ is useless) and even managed to insert one of them into database. But i can`t insert more then one because of primary key constrain while they all are equal.

I discovered just 4: Ș ș Ț ț. But 4 is just enough to spoil my system.

And this is the short but informative example of how do they behave:

DECLARE @Strings TABLE(id int, ucode nvarchar(50))
INSERT INTO @Strings (id, ucode)
    SELECT 1, N'A' UNION -- Usual char
    SELECT 2, N'Ы' UNION -- Some unicode char    
    SELECT 3, N'Ф' UNION -- Another unicode char
    SELECT 5, N' ' UNION -- space
    SELECT 6, N'Ș' UNION -- Unusual unicode char
    SELECT 7, N'Ț' UNION -- Unusual unicode char
    SELECT 8, N'some_string' UNION      -- example string
    SELECT 9, N'some_string ' UNION     -- example string with space
    SELECT 10, N'some_string Ș' UNION   -- example string with unusual char
    SELECT 11, N'some_string Ț'         -- one more

 SELECT * FROM @Strings
 SELECT * FROM @Strings WHERE ucode = N'A'  -- Good one (1 result)
 SELECT * FROM @Strings WHERE ucode = N'Ș'  -- Magic (3 results)
 SELECT * FROM @Strings WHERE ucode = N'Ț'  -- Magic (3 results)
 SELECT * FROM @Strings WHERE ucode = ''    -- Magic (3 results)
 SELECT * FROM @Strings WHERE ucode = 'some_string' -- Magic (4 results)

Do you have any suggestion?

  • 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-17T01:24:05+00:00Added an answer on June 17, 2026 at 1:24 am

    = isn’t useless, but you need to specify how = should compare. The default is set at the database level, and your column does not specify different comparison rules, so your column gets the database’s comparison rules. Primary keys use the same comparison rules as =, so fixing it for one also makes the other work as you intend it to.

    Specifying the comparison rules is done with the COLLATE keyword. One collation that should treat all code points as distinct characters is Latin1_General_BIN2.

    DECLARE @Strings TABLE(id int, ucode nvarchar(50) COLLATE Latin1_General_BIN2)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database table transaction which stores all the transaction made by users
I Have one table. There is one column name is branch. Which contains comma
I have a multi-language website that communicates with a database, which contains language-specific translations.
I have a database table which records all field changes in all database tables
I have a database table which has 2 columns and I have a List
i have database table like this +-------+--------------+----------+ | id | ip | date |
My database table have a Timestamp column named as inTime and i am using
I have an ASP.Net website which uses a MySQL database for the back end.
I have a table of data which I would like to order by the
I have database table: DROP TABLE translation_en_lt; CREATE TABLE translation_en_lt ( id INTEGER, lt_translation

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.