collation

Japanese/Chinese language data in SQL Server table

So I've got an interesting problem that I need help with faster than I can get my skills with SQL Server up to par. We have a table that contains a bunch of text, all of it in different languages. Most of this data appears correctly in the browser, however, anything in Chinese or Japanese gets completely mangled by the browser. This i...

Change collation on clustered index column in SQL 2005

I have a Database that was created with an incorrect collation. I changed the collation of the database, but this left the individual columns with the incorrect collation also. This causes me a problem. So, I wrote a script to loop through and change the collation of the individual columns and this basically worked, except for a few col...

How to sort text in sqlite3 with specified locale?

Sqlite3 by default sorts only by ascii letters. I tried to look in google, but the only thing I found were informations about collations. Sqlite3 has only NOCASE, RTRIM and BIARY collations. How to add support for a specific locale? (I'm using it in Rails application) ...

When must we use NVARCHAR/NCHAR instead of VARCHAR/CHAR in SQL Server?

Is there a rule when we must use the Unicode types? I have seen that most of the European languages (German, Italian, English, ...) are fine in the same database in VARCHAR columns. I am looking for something like: If you have Chinese --> use NVARCHAR If you have German and Arabic --> use NVARCHAR What about the collation of the...

MySql alter table Collation

create table check2(f1 varchar(20),f2 varchar(20)); creates a table with the default collation latin1_general_ci; alter table check2 collate latin1_general_cs; show full columns from check2; shows the individual collation of the columns as 'latin1_general_ci'. Then what is the effect of the alter table command? ...

SQL query that distinguishes between ß and ss

It seems that ß=ss in SQL. I need to be able to distinguish on a strict charcter equivalent basis. i.e. select * from table where name like '%ß%' yields Brian Bruß Steven Sossmix etc.. I've looked at different Collations to see if there is one that ignores character expansions, but no luck so far. Database has Latin1_General_CI_AS as...

How to implement the accent/diacritic insensitive search in Sqlite?

Is there a way to do an accent/diacritic insensitive search in sqlite? Googling, I've found this, but I sincerely don't know how to create my "collation function" in C#. I'm trying create the pt-br collation for Sqlite... ...

Problems with Turkish SQL Collation (classic "I" problem)

Hi, I'm having problems with our MSSQL database set to any of the Turkish Collations. Becuase of the "Turkish I" problem, none of our queries containing an 'i' in them are working correctly. For example, if we have a table called "Unit" with a column "UnitID" defined in that case, the query "select unitid from unit" no longer works beca...

Fatal error: Uncaught exception 'MySQLiQuery_Exception' with message 'Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) - with PHP5

Hi, I've got this error: Fatal error: Uncaught exception 'MySQLiQuery_Exception' with message 'Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=': select id from 'addresses' where 'shiptozip'='13000' and 'shiptostreet'='Františka Křížka' As you can see, I'm trying to get an ID from...

Storing a case insensitive VarChar in Postgres SQL

I want to add some constraint to my username VARCHAR in the sql table so that if a username exists, a duplicate username in a different case cannot be created. How can I do this? thanks edit: I am using postgres sql, a little syntax help will be greatly appreicated ...

Sql collation issues when deploying live.

History: I had a deployment the other night which involved executing a script that creates a stored procedure. However when running the script, an error occurred about the collation of the DB. The Problem: With the help of our friend Google, I managed to find out that the problem I was having was because on our live environment's db ha...

VARCHAR collation versus VARBINARY ordering in SQL Server 2000

I need to do some in-memory merging in C# of two sorted streams of strings coming from one or more SQL Server 2000 databases into a single sorted stream. These streams of data can be huge, so I don't want to pull both streams into memory. Instead, I need to keep one item at a time from each stream in memory and at each step, compare the ...

SQL Server 2005 collation issue

Hello everyone, I have two tables, and they are using different collations. It is not allowed to concatenate columns from tables with different collations, for example the following SQL is not allowed, select table1column1 + table2column2 from ... My question is, how to change the collation of a table without destroying the data of t...

Join column with different collation issue

Hello everyone, I am using SQL Server 2005. I have two tables, and they are using different collations. It is not allowed to concatenate columns from tables with different collations, for example the following SQL is not allowed, select table1column1 + table2column2 from ... My question is, why concatenation of two columns from diffe...

How can I resolve my collation conflict in a better way?

I have a collation problem with my database and I have developed my own solution. Solution: DECLARE @new_collation varchar(128), @conflict_collation varchar(128), @cmd_holder varchar(2000), @cmd_complete varchar(2000), @schema varchar(128), @table_name varchar(128), @constraints_name varchar(128), @column_name varchar(128...

Does MySQL collation type need to match PHP page charset type?

I have started debugging my RSS feed because it has some strange characters in it (i.e. the missing-character glyph). I started with two excellent beginner resources: The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets: http://www.joelonsoftware.com/articles/Unicode.html Chara...

MySQL / PHP problem with " and '

Hi I made a simple news system with comments using PHP and MySQL, and it worked great on my local Apache server, both on my Fedora 10 machine, and my Windows 7 one. Now I have a problem though, I uploaded it to a web host and it keeps returning all the ' and " as \' and \". I believe this is either the web host who by automatic adds them...

problem with find in set

Hello everyone. I get the following error: Illegal mix of collations (latin1_swedish_ci,COERCIBLE) and (utf8_general_ci,IMPLICIT) for operation 'find_in_set' This is the query I was trying to execute: SELECT ID FROM xs_user_profiles WHERE ID='' AND FIND_IN_SET('1',site_structure); I looked up the properties of this table a...

mysql varbinary vs varchar

Hi, We use varchar(255) for storing "keywords" in mysql. We are facing a problem that mysql ignores all trailing spaces for comparison purposes in "=". It does respect trailing spaces in "like" comparison, but it does not let us store same word with and without trailing spaces in a varchar column if it has a "UNIQUE" index over it. So,...

Mysql change column collation and character set of information schema

i want to change column collation and character set of system database information_schema... can anyone give any input on how to do this? is there any special priviledges i need for this ...