collation

A script to change all tables and fields to the utf-8-bin collation in MYSQL

Is there a SQL or PHP script that I can run that will change the default collation in all tables and fields in a database? I can write one myself, but I think that this should be something that readily available at a site like this. If I can come up with one myself before somebody posts one, I will post it myself. ...

How do I determine the collation of a database in SQL 2005?

How do you determine the collation of a database in SQL 2005, for instance if you need to perform a case-insensitive search/replace? ...

How do I perform a case-sensitive search and replace in SQL 2000/2005?

In order to perform a case-sensitive search/replace on a table in a SQL 2000/2005 database, you must use the correct collation. How do you determine whether the default collation for a database is case-sensitive, and if it isn't, how to perform a case-sensitive search/replace? ...

How do I find out what collations are available in SQL 2000/2005

If I need to choose a collation mode to work with, how do I know what collations are available? ...

What is the best way to select string fields based on character ranges?

I need to add the ability for users of my software to select records by character ranges. How can I write a query that returns all widgets from a table whose name falls in the range Ba-Bi for example? Currently I'm using greater than and less than operators, so the above example would become: select * from widget where name >= 'ba' and...

Change SQL Server 2005 Server Collation

I need to set up an instance of SQL Server 2005 with SQL_Latin1_General_CP850_Bin as the server collation (the vendor did not take into accounting looking at DB collation for a bunch of things so stored procedures and temp tables default to the server level and the default collation will not work). During the install for SQL Server it di...

MySQL - Illegal mix of collations (utf8_general_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'UNION'

How do I fix that error once and for all? I just want to be able to do unions in MySQL. (I'm looking for a shortcut, like an option to make MySQL ignore that issue or take it's best guess, not looking to change collations on 100s of tables ... at least not today) ...

Differences in prepared vs. direct statements using Oracle ODBC

I'm using an Oracle database with a collation different to my OS language. I'm accessing the database using the ODBC driver. When I prepare a statement (e.g. a "select * from x where=?"), that involves special non-ASCII characters supported by the DB's collation, I'm finding the data row with the characters. When I execute the select dir...

Sql Server Management - Option to avoid scripting the collation?

I have databases with different collations. I want to be able to script out tables from one database and create them in another. However, when I script out the tables, it includes the collation in the column definitions. Is there a way to exclude the collations from the generated table creation scripts? ...

The application sorts strings differently than the database

I am trying to sort a list of products by their name in a .Net application written in C#, to obtain the same list that I would get from an SQL Server database through an order by: select * from Products order by ProductName Unfortunately, the application sorting behaves differently than the database sorting. It is probably related to th...

MySQL collations not working as advertised in documentation

I'm trying to get my MySQL table to behave as the utf8 table in Example 2 from this MySQL Reference page: CREATE TABLE germanutf8 (c CHAR(10)) CHARACTER SET utf8 COLLATE utf8_unicode_ci; INSERT INTO germanutf8 VALUES ('Bar'), ('Bär'); SELECT * FROM germanutf8 WHERE c = 'Bär'; According to the example, this should yield: +------+ | c ...

how to force php to use utf-8 charset

errr im not sure if my question's title is clear enough but i'll try my best to explain i really am not sure about how php executes the function mysql_query in terms of retrieval and storageof strings, does it recognize any character set encodings used in the table? and does my browser by default overrides any character encodings sent th...

JavaScript: Efficiently replace all accented characters in a string?

For a poor man's implementation of near-collation-correct sorting on the client side I need a JavaScript function that does efficient single character replacement in a string. Here is what I mean (note that this applies to German text, other languages sort differently): native sorting gets it wrong: a b c o u z ä ö ü collation-correct...

phpmyadmin displays japanese characters as a bunch of question marks even if i set charset and collation to utf8_unicode_ci

okee, i followed all instructions i could find here and i could display all kinds of multilingual characters on my pages... the problem is in phpmyadmin the japanese characters are replaced by question marks, as in a bunch of ???? ??? pieced together i think there's a problem with my database's collation but i just wanted to verify that ...

SQL Stored Proc Collation Context

Hey, I'm having an issue that appears to be related to collation, but I'm not sure. I'm developing against a backup of my production database. The only difference in the SQL Server 2005 environments (that I'm aware of right now) is that my localhost has "SQL_Latin1_General_CP1_CS_AS" (Case sensitive) as the collation, and the production...

What is the best collation to use for MySQL (with PHP)

I'm wondering if there is a "best" choice for collation in MySQL for a general website where you aren't 100% of what will be entered? I understand that all the encodings should be the same, such as MySQL, Apache, the HTML and anything inside PHP. In the past I have set PHP to output in "UTF-8", but which collation does this match in MyS...

Comparing strings in PHP the same way MySQL does

I'm storing a varchar in a utf8 MySQL table and using utf8_general_ci collation. I have a unique index on the varchar. I'd like to do a string comparison in PHP that is equivalent to what MySQL will do on the index. A specific example is that I'd like to be able to detect that 'a' is considered equivalent to 'À' in PHP before this ha...

MySQL internationalization with DCM4CHEE

I'm attempting to internationalize dcm4chee (a Java based open source medical imaging storage with system) with MySQL, and have a number of questions. Here's what I know so far 1. I need to change the character set from latin1 to utf8 (to support all the international characters) in the MySQL 2. I'm pretty sure I want to set the collati...

Does sqlserver collation mean column names must be correct case? And how to deal with that...

In SQL Server (2000 or 2005) is it possible to set the database or server collation so that identifier names (tables, columns, etc) need to be in the correct case? If so, is that true of all case-sensitive collations or is it a separate setting? (I've always thought of case-sensitivity applying to data, not to names of objects). Presuma...

Sql Server 2008 - Difference between collation types

Hi, I'm installing a new SQL Server 2008 server and are having some problems getting any usable information regarding different collations. I have searched SQL Server BOL and google'ed for an answer but can't seem to be able to find any usable information. What is the difference between the Windows Collation "Finnish_Swedish_100" and ...