Questions tagged [collation]

Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types and character width.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
22 views

Mysql collation diffetence between utf8mb4_unicode_520_ci and utf8mb4_bin? [duplicate]

In a MySQL table where I need to store many websites titles/description/kewyords (so "very" multilanguage), will I be able to store the same chars if I use utf8mb4_bin collation instead of ...
adrianTNT's user avatar
  • 3,746
1 vote
1 answer
40 views

How to detect in PHP that pensé is the same as pense [duplicate]

How can I do a test in PHP to compare two words (one with accent) and detect that is the same word ? e.g pensé vs pense Basically I told it to load certain words from MySQL table, and with MySQL ...
adrianTNT's user avatar
  • 3,746
1 vote
1 answer
85 views

How add more items into collation menu in pgAdmin 4?

I want to create a new database in pgAdmin (PostgreSQL 16 on Widnows 10) but i can only chose from 3 items for database Collation. If i list available collations by select * from pg_collation pgc , ...
Pavel Sala's user avatar
1 vote
0 answers
39 views

Arabic appears in question marks when move data from Visual Studio project to SQL Server database [closed]

I have a problem with my Visual Studio/SQL Server project. When I input data in VS project to be stored in the SQL Server database, the data I entered in Arabic appears as question marks in database. ...
Amine Amari's user avatar
0 votes
0 answers
47 views

sys.all_columns raises error:Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Arabic_CI_AS" in the equal to operation

I tried to change default collation of my SQL Server to the default one: "SQL_Latin1_General_CP1_CI_AS" by this command: sqlservr -m -T4022 -T3659 -s”MSSQLSERVER” -q”...
Vajihe Jami's user avatar
0 votes
1 answer
55 views

Everything is utf8mb4_unicode_ci but getting Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

I'm doing a query through PHP and getting the following error from MySQL: 1267: Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=') This is the ...
Kenny Wyland's user avatar
1 vote
2 answers
68 views

Wordpress created Collation Mess and is now unable to read it since MySQL8?

I have a Wordpress site since 2009 and in the time being it created a real mess in the collations. I got: latin1_swedish_ci (never had word swedish on my site? Everything is in German) ...
Soennchen's user avatar
2 votes
2 answers
145 views

Accent sensitive sort in PostgreSQL

How to sort text in PostgreSQL in Latvian alphabetic order, so any letter without accent always comes before the letter with accent? For example this select * from ( select 'bā' as name union ...
va.'s user avatar
  • 770
1 vote
1 answer
43 views

What is the difference between utf8mb4_cs_0900_as_cs and utf8mb4_900_as_cs?

I'm facing issues when building unit tests for my SQLALCHEMY api. I noticed that my MySQL DB returns an unexpected order when asking to order by a string column. A little investigation showed that our ...
LDevelop's user avatar
0 votes
0 answers
16 views

MySQL (WordPress) Illegal mix of collations error when attempting to compare post_type to 'string' in DELETE trigger [duplicate]

MySQL throws a #1267 - Illegal mix of collations (utf8mb4_unicode_520_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation '=' when I delete a row in wp_posts with the below BEFORE DELETE ...
Crunchy Bueno's user avatar
0 votes
1 answer
52 views

Set global collation for SQLite in Entity Framework Core

SQLite is case sensitive by default so I need to set the NOCASE collation using Entity Framework Core. I know I can set it per column like this: protected override void OnModelCreating(ModelBuilder ...
TheHvidsten's user avatar
  • 4,072
0 votes
1 answer
80 views

Alter database collation in EF Core using migration scripts

I am trying to change the collation of the database using the migration script. This is the code from which I am trying to update the collation using EF Core. protected override void Up(...
Hardik Parmar's user avatar
0 votes
0 answers
30 views

Data set and collation in a Mysql DB

I created a database in Mysql for a record room mgt system using Sinhala character set. But when I export that database file and use it in another database(by importing) all the characters show as ...
Dimuth Nanayakkara's user avatar
1 vote
1 answer
69 views

Character issue on Windows Server, not on Unix (� characters)

On my Windows Server 2019 In my NodeJS script I'm writing to the database using the Prisma library. The field I'm adding this to is an NVARCHAR(1000) field. So that should accept this character, right?...
Miguel Stevens's user avatar
0 votes
1 answer
252 views

Cannot resolve collation conflict between "Polish_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in CASE operator occurring in SELECT statement

My query selects data from two databases on the same server. The server collation is SQL_Latin1_General_CP1_CI_AS. db1 collation is Polish_CI_AS db2 collation was SQL_Latin1_General_CP1_CI_AS but I ...
user3057544's user avatar
0 votes
1 answer
53 views

Is there a way to check if a view is using the correct casing for column and table names?

By default, SQL Server is case insensitive. If you have a table called 'Test', it's possible to load data from it with a query such as: SELECT * FROM teST However, this query will fail if the ...
JonathonMinard's user avatar
1 vote
1 answer
203 views

How to change Collation in a Synapse Serverless Database

How to change the collation of a Synapse Serverless database? Specifically Latin1_General_100_CI_AI_SC_UTF8, as that seems to be recommended, and I'm trying to performance tune. alter database ...
Pingyao's user avatar
  • 75
1 vote
1 answer
70 views

SQL Server Collation Setting

In the SQL server, the default collation is SQL_Latin1_General_CP1_CI_AS, previously, I used to specify the collation explicitly at the end of each query to SQL_Latin1_General_CP1_CI_AI to ignore the ...
Ⲁⲅⲅⲉⲗⲟⲥ's user avatar
1 vote
2 answers
116 views

Django search in Postgresql db_collation field

I'm using Django and DRF searchFilter, which allows me to add fields to the view's 'search_fields' to allow searching in them. Django version is 3.2 (will probably upgrade to 4.2) and DRF version 3.12....
user2880391's user avatar
  • 2,693
0 votes
0 answers
25 views

ICU Collator locale falls to 'root' in deployed server

Collator locale falls to 'root' in cloud deployed application server but works fine while testing in localhost. We are trying to compare and sort based on Swedish locale using ffi-icu Rubygem. ...
Shanmathi S's user avatar
0 votes
0 answers
29 views

Querying ASCII columns with Unicode search strings yields "Illegal mix of collations"

== Given == // MariaDB 11 system > show variables like '%coll%'; +----------------------+------------------------+ | Variable_name | Value | +----------------------+--------...
jjorge's user avatar
  • 21
0 votes
1 answer
195 views

(mysql workbench)ERROR 1273 (HY000) at line 25: Unknown collation: 'utf8mb4_0900_ai_ci' --user=root --port=3306 --default-character-set=utf8

i an importing sql dump file in my database but getting this error 11:29:12 Restoring E:\ews project\dumps\Dump20230525.sql Running: mysql.exe --defaults-file="C:\Users\INP\AppData\Local\...
igneous spark's user avatar
0 votes
1 answer
45 views

SQL Server Collation effect on query

SQL Server running 2016 on VM. The collation is set to SQL_Latin1_General_CP1_CI_AS Restored a database into the server and it is a collation of Latin1_General_CI_AS. During testing all was good and ...
MrTG's user avatar
  • 13
3 votes
3 answers
202 views

Where are specific collations used in a modern utf application

I was wondering if collation is still a big issue when working with databases without legacy data. For example, for something like BigQuery or Snowflake the character encoding is utf-8. BigQuery ...
David542's user avatar
  • 106k
0 votes
0 answers
43 views

Use same collation for string comparison in migration script

I have an application, which is running on different databases. For migration I use Liquibase scripts. Lately I had a script which migrated a varchar column (let's name it exampleName) from a really ...
Tobias Liefke's user avatar
0 votes
1 answer
132 views

Greek characters into varchar column and with Cyrillic colation

I have SQL Server 2019. If I have a table with Cyrillic collation and a varchar column I can't find a way to insert Greek letters: CREATE TABLE dbo.tmp ( id int NOT NULL , name varchar(75) ...
Ivan69's user avatar
  • 127
0 votes
1 answer
72 views

ICU collation - is there a way to compare numeric strings in numeric order such that leading 0s are taken into account?

I am trying to create a collator that compares numbers in strings with numeric order, but not ignore leading zeros. For example - 001 < 01 < 002 < 0011 ... At first I tried the following: ...
Y FY's user avatar
  • 9
-1 votes
1 answer
48 views

Laravel point type store works fine but retrieving data gives incorrect result

I'm storing Point data type in the database it works fine when storing data. but when I want to get all data from the database even with Tinker, the location column data is incorrect. I don't know ...
Mahdi Alikhani's user avatar
0 votes
1 answer
101 views

Possible to introspect collation on a string in BigQuery?

Let's say I have the following: SELECT COLLATE("hello", "und:ci") If this string value of "hello" is ever used later, for example in a comparison -- or stored to a table ...
David542's user avatar
  • 106k
1 vote
1 answer
136 views

MySQL: Illegal mix of collations: both same collation

I see a number of questions on SO regarding something similar, but none of them addresses this particular detail. I created a database using something like this: CREATE DATABASE db CHARACTER SET ...
Manngo's user avatar
  • 14.6k
-2 votes
1 answer
204 views

Why is MySQL Workbench showing wrong collation in table editor?

I'm currently using MySQL Workbench 8.0.21. If I press the wrench icon for the table editor window I always get the same (wrong) collation utf8mb4_0900_ai_ci. But this is not the real collation for ...
testing's user avatar
  • 19.8k
0 votes
1 answer
70 views

MySQL Convert Function Deleting Data / Invalid Characters - How to prevent deletion when converting Mojibake to Emoji?

Somehow my database tables changed all my emoji and foreign characters into Mojibake. I'm trying to reverse it by using this function: UPDATE table SET user_post = convert(cast(convert(user_post using ...
peppy's user avatar
  • 183
0 votes
2 answers
96 views

mysqli_get_charset showing wrong collation - How to update?

I am using PHP 8.1 and MySQL 8.0. All databases, tables and individual fields are all set to a collation of utf8mb4_0900_ai_ci - except for databases: information_schema and performance_schema, which ...
peppy's user avatar
  • 183
0 votes
1 answer
111 views

Specify Collation in Docker installation

I've used this guide to install sqlserver on docker. However, the default collation it sets up is not the one I require. Is there a way to specify the desired collation during the installation process ...
Yan Ayata's user avatar
0 votes
0 answers
76 views

Page showing ’ instead of an apostrophe(') - PHP 8.1 + MySQL 8.0 [duplicate]

I'm having a problem with the webpage inconsistently not showing characters correctly for user-generated posts, such as showing ’ instead of ', for example. However, this doesn't happen all the time,...
peppy's user avatar
  • 183
0 votes
0 answers
14 views

How to write a collation rule for custom sorting?

I want following rules to applied while sorting The upper case should come after the lower case for the same alphabet, for example, i. mike ii. Milo Punctuation in the beginning of the string should ...
Karthikeyan Amaresan's user avatar
0 votes
1 answer
29 views

How to do collation sorting with lowercase first?

Input For the given list of below strings, Senthil Anbu arthi Sugumar suresh venila Expected I want the sorting order to be arthi Anbu suresh Senthil Sugumar venila Actual But getting the follow ...
Karthikeyan Amaresan's user avatar
0 votes
0 answers
37 views

Inserting a ≤ character gets converted into = sign [duplicate]

We have a SQL server running on Azure RDS, We have a problem where a stored procedure is doing some ETL work parsing JSON value, ultimately I tracked down the problem to this minimal reproducible ...
Carmageddon's user avatar
  • 2,677
1 vote
2 answers
88 views

Querying extended properties in SQL Server with CS_AS Collation Does not Provide Correct Results

I have two databases, one with a collation of Latin1_General_CI_AI and the other with Latin1_General_CS_AS. Both databases have an extended property called Version and both are set to 1. If I run the ...
Arthur Quenneville's user avatar
0 votes
1 answer
42 views

Postgres collation with negated numerics

Is there a way to order by a varchar column numerically, so that the negated numbers go first: aaa-10bbb < aaa-2bbb < aaa2bbb I used the following collation CREATE COLLATION custom_collation (...
androberz's user avatar
  • 754
1 vote
1 answer
226 views

Binary data type collation with Characters in MariaDB

I am trying to get a deep understanding about RDBMS, I am learning MariaDB. Struggling to get the Binary data type and how its collation works. I understand the binary(n) data type takes n bytes. This ...
theMyth's user avatar
  • 121
0 votes
0 answers
169 views

Change the collation of fields when using OpenRowSet

I have this task where I need to use OpenRowset to insert data into a table and then use that table further for specific calculation (using views). This is the code for OpenRowSet that I am using: ...
DEV123's user avatar
  • 1
7 votes
2 answers
5k views

template database "template1" has a collation version, but no actual collation version could be determined

I just upgraded my Postgres from 12 to 15 and I keep getting this error: template database "template1" has a collation version, but no actual collation version could be determined Here's the ...
buddy2891's user avatar
  • 197
1 vote
1 answer
54 views

mysql - problem with comparing strings constants containing national characters

I have the following test schema at MySQL 8.0.32: CREATE SCHEMA `test_schema` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_pl_0900_ai_ci ; CREATE TABLE `test_schema`.`test_table` ( `test_column` ...
Kuba D's user avatar
  • 105
0 votes
0 answers
39 views

Is it possible to sort in a custom grouping manner with unicode collation algorithm in elasticsearch?

I am working on a phonebook, where if the user does not provide Name but fills only email, I will show the email value in phonebook (as in mac contacts). And the priority is as follows Name (if not ...
Karthik Amar's user avatar
1 vote
2 answers
220 views

One column ends up with different collation in view

I've a bit of a strange issue going on. My database is set to the utf8mb4_unicode_ci collation. So are the (WooCommerce) tables within that database. The columns in the table are also at ...
golabs's user avatar
  • 169
0 votes
1 answer
116 views

How to write a collation rule for elasticsearch icu_collation_keyword field, with alphabets having at most precedence?

Instead of using alternative locale option, I want to write a rules parameter to customise the sort behaviour with alphabets having atmost precedence. for the text values, $1232, Abi, £7232, 87343, ...
Karthik Amar's user avatar
0 votes
1 answer
59 views

How to display a column's Unicode fonts in SSMS Grid Results?

SSMS [v19.0.1] fonts have been set to Consolas for both Text Editor and Grid Results. Unicode fonts are being displayed properly in the SSMS text editor but not in grid results, where they are being ...
Tim's user avatar
  • 8,739
2 votes
2 answers
461 views

PostgreSQL is icu collation 'de-u-kn-true-ks-level2' deterministic?

For my database I want natural ('A2'<'A12'), case-insensitive sorting, so for testing I created a new collation with CREATE COLLATION tomscollation (provider = icu, locale = 'de-u-kn-true-ks-level2'...
Tom's user avatar
  • 503
0 votes
0 answers
73 views

Symfony doctrine default table collation not working

I am trying to have symfony doctrine generate my database with Swedish collation (otherwise the sorting of characters åäö gets all messed up). I put this in my config file, but it seems to have no ...
Matt Welander's user avatar

1
2 3 4 5
37