collation

Case-insensitive primary key of type nvarchar where ß != ss

时间秒杀一切 提交于 2019-12-23 20:00:27
问题 This question "Need a case insensitive collation where ss != ß" solves it for varchar type column, but mine has to be nvarchar . As far as I can gather, SQL_Latin1_General_Cp437_BIN differentiates between ß and ss . But it is also case-sensitive. Mine is a primary key column which also needs to be case INsensitive: I need e.g. weiß / Weiß to be considered equal, and also weiss / Weiss , but NOT weiß / weiss nor Weiß / Weiss nor weiß / Weiss etc. I've searched a lot for this, and is it really

Ruby on Rails: compare two strings in terms of database collation

只谈情不闲聊 提交于 2019-12-23 17:27:42
问题 I have a list of words and want to find which ones already exist in the database. Instead of making tens of SQL queries, I decided to use "SELECT word FROM table WHERE word IN(array_of_words)" and then loop through the result. The problem is database collation. http://www.collation-charts.org/mysql60/mysql604.utf8_general_ci.european.html There are many different characters, which MySQL treats as the same. However, in Ruby code string1 would not be equal to string2. For example: if the word

Hebrew and other languages in sql

不想你离开。 提交于 2019-12-23 14:39:19
问题 I have SQL Server on hosting, clients are mobile applications. I have logic that user creates data and store it on server. Some of the data is text. However user can enter english, hebrew or any other languages his client supports. Which Collation I need to specify to the tables to support all languages? Regards Yoav 回答1: you need to store it as nvarchar and make sure to prefix the text with N example declare @n nchar(1) set @n = N'文' select @n GO declare @n nchar(1) set @n = '文' select @n

H2 database collation strength: what to choose?

穿精又带淫゛_ 提交于 2019-12-23 12:49:53
问题 After a lot of reading and experimentation, it seems like I want PRIMARY strength for searching, but TERTIARY or IDENTICAL for ordering. Main question: Is that possible to achieve with H2 (or any other DB)? Secondary question: Am I the only one here or would any of you also like the above combination? Some confirmation would be helpful for my sanity. Background: It seems like the collation can only be set at the very beginning when creating the database. So I want to make sure to pick the

Sql Server 2008 - Difference between collation types

旧城冷巷雨未停 提交于 2019-12-23 09:38:30
问题 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 "Finnish_Swedish" ? I suppose that the "_100" -version is a updated collation in SQL Server 2008, but what things have changed from the older version if that is the

Can Perl 6 sort or compare based on collations?

别说谁变了你拦得住时间么 提交于 2019-12-23 07:50:02
问题 The cmp operator works on code numbers, or at least that's what I think it does because the docs aren't explicit on that and don't mention any localization stuff. Can I make it sort by other collations? I know I tell sort how to compare, but I figure it must be in there already (somewhere). 回答1: Collation is available as an experimental feature: my @list = <a ö ä Ä o ø>; say @list.sort; # (a o Ä ä ö ø) use experimental :collation; say @list.collate; # (a ä Ä o ö ø) $*COLLATION.set(:tertiary

Collation STRENGTH and local language relation

时光怂恿深爱的人放手 提交于 2019-12-23 07:28:25
问题 I have read the following from Collator's Javadoc. "The exact assignment of strengths to language features is locale dependant. For example, in Czech, "e" and "f" are considered primary differences, while "e" and "ê" are secondary differences, "e" and "E" are tertiary differences and "e" and "e" are identical." Does this mean that I should set the STRENGTH based on the language I am using? If so can someone suggest the defaults for the locales: us_en, us_es, ca_fr, spain_spanish, chile

Azure nodejs site cannot connect to SQL DB that has a collation different than the default

感情迁移 提交于 2019-12-23 05:58:07
问题 I have this simple nodejs page http://pastebin.com/HxMsHBbg /** * Module dependencies. */ var express = require('express'), http = require('http'), url = require('url'), util = require('util'); var nconf = require('nconf'); var sql = require('node-sqlserver'); nconf.env(); var conn = nconf.get("SQL_CONN"); var app = express(); app.get('/', function(req, res){ var qs = url.parse( req.url, true ); res.writeHead(200, {'Content-Type': 'application/json; charset=utf-8'}); var alldata={}; var

Storing Urdu characters in MySQL [duplicate]

为君一笑 提交于 2019-12-23 05:51:33
问题 This question already has answers here : Save Data in Arabic in MySQL database (7 answers) Closed 3 years ago . I am having problems storing urdu characters in Mysql table. Values from HTML form are stored in tables but when I view in phpmyadmin, it shows weird characters. I have tried ucs2 and utf8 collations but still new values which I store are unknown characters. What is the correct collation type? Or is there anything else that is wrong? Thanks 回答1: Try setting your column as utf8-utf8

Convert Mysql latin1_swedish_ci to utf8_bin

自作多情 提交于 2019-12-23 03:39:13
问题 I want to know how to convert *MySql latin1_swedish_ci*(eg.所 有 重) to *utf8_bin*(所 有 重) using SQL or command line. Is it possible or not? 回答1: You may try this Convert existing MySQL database from one charset encoding to another ALTER DATABASE db_name DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; Convert existing table from one charset encoding to another ALTER TABLE db_table CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; Hope this help. Nathanphan 来源: https://stackoverflow.com