collation

How do I achieve something like MySQL's latin1_general_ci collation in PHP?

I am writing a string compare function to sort medical terms that often contain special accented characters from many different European languages, and I need to somehow achieve a collation similar to MySQL's latin1_general_ci. First, I'm doing some basic munging on the strings to remove spaces, quotes, hyphens, parentheses, etc. The pr...

How do I sort alphabetically in Python?

Python sorts by byte value by default, which means é comes after z and other equally funny things. What is the best way to sort alphabetically in Python? Is there a library for this? I couldn't find anything. Preferrably sorting should have language support so it understands that åäö should be sorted after z in Swedish, but that ü shoul...

Changing default collation of a SQL Server 2008 instance

Hello, When I try to change the default collation of a SQL Server instance using this commandline: setup.exe /QUIET /ACTION=REBUILDDATABASE /INSTANCENAME=MSSQLSERVER /SAPWD=********* /SQLCOLLECTION=SQL_Latin1_General_CP1_CI_AS I get the following message: Microsoft (R) SQL Server 2008 Setup 10.00.1600.22 Copyright (c) Microsoft Corpo...

SQL Server 2005: Need advice on handling multiple-language data in one table column

I'm running SQL Server 2005 and .Net 2.0. I have some tables that need to store data in multiple languages, in the same column. E.g. an Article table, with ArticleID (identity) and ArticleName (nvarchar 100) The data in ArticleName might be in various languages. My database is using the default collation of SQL_Latin1_General_CP1_CI_AS,...

If a sql server's server collation is case sensitive and a database is case-insensitive, will queries be case-sensitive or not?

If a sql server's server collation is case sensitive and a database is case-insensitive, will queries be case-sensitive or not? I thought that it was supposed to be based on the database rather than the server collation, but having done a short test that seems not to be the case. Anyone know for sure? ...

SQL Server Collation, Management Studio Results differ from asp.net Results

i am usering an Table with a user name column and collation SQL_Latin1_General_CP1_CI_AS now the query: select 1 where exists(select 1 FROM USER_TABLE WITH(NOLOCK) WHERE user_name='sueßemaus') in asp.net results: 1 in SQL Management Studio results: [nothing] there is a record with name "süßemaus" compared to collation the correct Res...

Create a Duplicate Database - Different Collation

My main question is how to copy a whole database having a English collation to one having a Greek collation? The source database is having all the tables and the related data. I have a clean Greek collation database. I want to copy everything from source to destination. One solution that I found in a KB article, consisted of the followi...

In MySQL, which collation should I choose?

When I create a new MySQL database through phpMyAdmin, I have the option to choose the collation (e.g.-default, armscii8, ascii, ... and UTF-8). The one I know is UTF-8, since I always see this in HTML source code. But what is the default collation? What are the differences between these choices, and which one should I use? ...

Illegal mix of collations error in MySql

Just got this answer from a previous question and it works a treat! SELECT username, (SUM(rating)/COUNT(*)) as TheAverage, Count(*) as TheCount FROM ratings WHERE month='Aug' GROUP BY username HAVING TheCount > 4 ORDER BY TheAverage DESC, TheCount DESC But when I stick this extra bit in it gives this error: Documentation #1267 - ...

asp.net replacing sql collation specific characters

Regardless of the sql database collation being used is there any way to replace the special characters when displayed in the interface. At least is there any way to implement that for the "Turkish I" so discussed here :-) I want to eliminate small dotless 'i'. ...

Where can I query an oracle databases' case-sensitivity?

Where can I query the current case-sensitivity setting of an oracle database? I've tried looking in v$database, nls_database_parameters, and looking through the system packages, but none of them seem to provide the information I need... ...

[MySQL] Case insensitive search without additional rules?

Hello, I'm trying to find a collation in MySQL (my version is 5.0) where strings that differ in case are considered the same but there're no other rules like: á = a and so on. I tried to find the proper collation here: http://www.collation-charts.org/mysql60/by-charset.html but it seems that the collation I'm looking for doesn't exi...

How to change collation of database, table, column?

Now the database is latin1_general_ci and i want to change collation to utf8_general_ci. Is there any settings in phpmyadmin to change collation of database, table, column? rather than changing one by one. ...

Collation Issue

Hi If I change the table type default collation to UTF8 from latin does it slow down the queries? ...

rake db:create - collation issues

kratos-iii:railsproj zachinglis$ rake db:create (in /Users/zachinglis/Sites/rails/railsproj) Couldn't create database for {"adapter"=>"mysql", "host"=>"localhost", "username"=>"root", "password"=>nil, "database"=>"railsproj_development"}, charset: utf8, collation: utf8_general_ci (if you set the charset manually, make sure you have a mat...

Does ICU handle the collation of a list of strings of varying languages?

My application may have strings comprised of different alphabets / languages in a single list. I can't seem to find any information on what the correct method for sorting these should be or any indication that ICU supports this functionality. Example List: Apple яблоко μήλο Baby βρέφος ребенок ...

Collation problem with Oracle linked to SQL Server

Hello everyone, On SQL Server 2000 there is a linked server to an Oracle 9.2 server. I am able to select from the remote tables, but all not latin (Greek) characters, return incorrect. I tried specifying a collation on the SQL Server, but nothing changed. ...

SQL Collation conflict when comparing to a constant

I have a SQL query that compares a value in the database to a constant: SELECT * FROM my_table INNER JOIN #TempTable tem ON my_table.id = temp.id AND my_table.key = 'SOME STRING' And I get the error: Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_CI_AS" in the equal to operati...

phpMyAdmin and latin1_swedish_ci

I create new database with utf8_general_ci collation, create test table also with utf8_general_ci collation, and then i click on my database(structure) and this is what i get: Why is that "latin1_swedish_ci" showing up? Edit: Ok how to change this, it is in phpmyadmin in "Variables" tab, under "Server variables and settings": Thi...

PostgreSQL utf8 character comparison

I am changing from MySQL to PostgreSQL but can't find equivalent to MySQL's collation utf8_general_ci. What I'm trying to achieve here is to be able to compare strings using general language rules rather then binary comparison, i.e. í = i, š = s, ḩ = h, etc... Is there a way how to make PostgreSQL search for strings using general langua...