collation

sql server collation for multi lingual data

。_饼干妹妹 提交于 2019-12-10 12:13:47
问题 I am working with sql server 2012 and its the back end for an asp.net mvc multi lingual application. I have set the collation on the database that powers the front end to "sql_latin1_general_cp1_ci_as". This database will stored, english, russian, arabic etc data and therefore I will run in the collation problems as my stored procedures that will access my data has where clauses, order by clauses etc. I have on set of stored procedures for which I access the data for language with. I am

Java Server Pages - collation when inserting into MySql?

♀尐吖头ヾ 提交于 2019-12-10 11:44:55
问题 I am using Java Server Pages and got problem with collation when inserting data from my application. My insert code looks like this: <%@page import="java.sql.*" %> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> <% Class.forName( "com.mysql.jdbc.Driver"); Connection con=DriverManager.getConnection("jdbc:mysql://localhost:3306/myapp", "root", ""); Statement st=con.createStatement(); ResultSet rs; st.executeUpdate("insert into table values (default,1,2

Is there any way to have PostgreSQL not collapse punctuation and spaces when collating using a language?

浪子不回头ぞ 提交于 2019-12-10 10:28:16
问题 From what I understand, PostgreSQL delegates collation to the strcoll() function of underlying operating system, and apparently most (if not all) Linux installations take advantage of the fact that punctuation and spaces can be optionally collapsed when collating in UTF-8. For example, I have a database in Postres 9.2 on CentOS 6.4 with ENCODING='UTF8' LC_COLLATE='en_US.UTF8' LC_CTYPE='en_US.UTF8' and you run the query select * from (values('abc'),('ABC'),('Abc'),('...ABc'),('a BC')) x order

Change default Sorting by Adding a Simple Collation to an 8-Bit Character Set

偶尔善良 提交于 2019-12-10 09:44:37
问题 Posted previously the question with zero responses, so I am replacing it with further clarification and details from my research results based on this MySQL manual entry. In the past, I've worked with alternate collations that allowed us to specify alternate default sorting. Mysql allows for this down to the column level, but I don't understand something to get it working. Our customers use a standard set of one character codes in almost all references to any master table, and presenting

Understand Unicode and code pages in SQL Server collations

梦想与她 提交于 2019-12-10 09:43:41
问题 Why all SQL Server 2008 R2 collations are associated to a code page. Are all collations unicode ? How to choose a collation when our database is used by several languages using differents code pages ? Thank you. 回答1: CHAR vs. NCHAR (ie. Non-Unicode vs. Unicode) defines the character storage encoding. Collations define... collation (ie. sort order and comparison rules). They are different concepts, although often confused. The confusion stems from the fact that the client tools use the

using unicode text in sql server 2008

牧云@^-^@ 提交于 2019-12-10 03:43:53
问题 I want to use unicode text in my site. I have nvarchar(max) data type in database to store the data. When I save unicode text into database, it works fine. However when i try to perform some sql operation the unicode text is changed to "?????" Eg, the query below declare @unicodetext nvarchar(250) set @unicodetext='बन्द' select @unicodetext results What is the solution for this? Thanks 回答1: Try declare @unicodetext nvarchar(250) set @unicodetext = N'बन्द' select @unicodetext Maybe you noticed

SQL Server - is there a way to mass resolve collation conflicts

核能气质少年 提交于 2019-12-09 01:11:58
问题 We have a situation where the collation of databases, tables, and some columns are different between our dev and production SQL Servers, and it's wreaking havoc on development. Things will work on dev and then break due to collation conflicts when promoted, data and structures will be copied from prod to dev which in turn breaks the queries on dev because of conflicts, etc. We'll work around it by either explicitly defining the COLLATION option in the query sometimes or setting the collation

Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='

天涯浪子 提交于 2019-12-08 15:56:30
问题 I got this error; Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '=' I changed "Collations" to "utf8mb4_unicode_ci". Then tables were truncated and I re-import rows again. But still getting same error 回答1: I am guessing you have different collations on the tables you are joining. It says you are using an illegal mix of collations in operations = . So you need to set collation. For example: WHERE tableA.field COLLATE utf8mb4_general_ci =

utf8_general_ci: which characters are equal? [closed]

半腔热情 提交于 2019-12-08 10:43:13
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . Where do I find a list of character sets that are equal in the WHERE clause? Background: The list of characters may be used to solve a problem mentioned in another question. (Also interesting, but not necessary for an answer: Is this collation fixed forever, or are future changes expected?) 回答1: I have found

Sql Server what to do to make collation key from a string value

好久不见. 提交于 2019-12-08 09:45:35
问题 I receive data files from a source I have no control over (the government) and in the records they have a Company Name field that I actually need to associate with existing company records in my database. I'm concerned that some of the names will vary by minor differences such as 'Company X, Inc.' vs 'Company X Inc'. So my initial thoughts would be to create a collation key field based on the name ToLower() and apply a regex to strip out all white space, and special characters. Is there any