collation

Invalid column name, column accents in MS SQL Server

前提是你 提交于 2019-12-25 02:13:01
问题 I'm currently working with an old database that has column names containing accents. When I try to execute this query in Codeigniter (PHP): SELECT * FROM [empresas] [em] LEFT JOIN [clientes] [cl] ON [em].[empresa] = [cl].[Código] The system throws the error "Invalid column name 'Código'". (the column name is 'Código') I've tried using COLLATE function with no success. The MS SQL Server database default collation is Modern_Spanish_CI_AI and the column collation is SQL_Latin1_General_CP1_CI_AS

choosing table collation for universal characters

烈酒焚心 提交于 2019-12-24 08:47:43
问题 I'm working on a backend that needs to store universal characters. I've chosen utf8mb4 Table Encoding for that purpose. I also have to choose Table Collation. The most straightforward option is to choose utf8mb4_general_ci Table collation. Besides the general one, there is also about 20 others collations to choose from.. What is the purpose of the more specific ones? Does utf8mb4_general_ci or maybe utf8mb4_unicode520_ci cover all of them? Which one should I use if I want to store characters

Accent-insensitive substring matching

↘锁芯ラ 提交于 2019-12-24 05:04:59
问题 I have a search functionality that obtains data from an InnoDB table ( utf8_spanish_ci collation) and displays it in an HTML document ( UTF-8 charset). The user types a substring and obtains a list of matches where the first substring occurrence is highlighted, e.g.: Matches for "AL": Álava <strong>Al</strong>bacete <strong>Al</strong>mería Ciudad Re<strong>al</strong> Málaga As you can see from the example, the search ignores both case and accent differences (MySQL takes care of it

Does H2 support a collation defintion for one single column?

社会主义新天地 提交于 2019-12-24 03:54:31
问题 I want to make a single H2 column in a H2 database to have a other collation (case insensitive) then the other columns (that are case sensitive). In MySQL I would do this: ALTER TABLE users MODIFY login VARCHAR(255) COLLATE utf8_general_ci Is there a similar feature in H2? 回答1: H2 only supports one collation per database (via SET COLLATION statement). What it does support is a case-insensitive data type, VARCHAR_IGNORECASE. Internally, this data type is using String.compareToIgnoreCase. This

How to make MySQL handle strings like SQLite does, with regard to Unicode and collation?

陌路散爱 提交于 2019-12-24 03:27:48
问题 I've been researching this question for several hours now, on SO, in MySQL docs, and elsewhere, but still can't find a satisfactory solution. The problem is: What is the simplest way to make MySQL treat strings just like SQLite does, without any extra "smart" conversions? For example, the following works perfectly in SQLite: CREATE TABLE `dummy` (`key` VARCHAR(255) NOT NULL UNIQUE); INSERT INTO `dummy` (`key`) VALUES ('one'); INSERT INTO `dummy` (`key`) VALUES ('one '); INSERT INTO `dummy` (

Android: Custom collation in SQLite

a 夏天 提交于 2019-12-24 01:54:40
问题 Is there a way of getting SQLite on Android to use a custom collation routine? I'm aware of SQLite's C interface to do this, so I guess I could do it by writing C code for building with the NDK, but I'd really prefer a way to do it at a higher level. I need to arrange things so that the text B-9 is sorted before B-29 , for example. The default alphabetical sort gets them the wrong way round. 回答1: I am pretty sure that there is no way to do this in Android. My suggestion would be to have a

mysql query select like with diacritic Turkish letters

微笑、不失礼 提交于 2019-12-24 01:38:09
问题 I have a token table in Turkish ; it's default collation is utf8_general_ci On FreeBSD server, mysql version is 5.6.15 I want to query; select * from tokens where type like 'âmâ'; or select * from tokens where type='âmâ'; With these queries, result must be one unique for 'âmâ' (it means 'blind' in Turkish also) But i have four raw result; result 1 "amâ" means 'but' result 2 "ama" means 'but' result 3 "âma" means 'blind' result 4 "âmâ" means 'blind' that didnt i want. I tried different

Prepare array for sorting in closure

孤街醉人 提交于 2019-12-24 01:15:54
问题 According to my research and googling, Javascript seems to lack support for locale aware sorting and string comparisons. There is localeCompare(), but it has been reported of browser specific differencies and impossibility to explicitly set which locale is used (the OS locale is not always the one wanted). There is some intentions to add collation support inside ECMAScript, but before it, we are on our own. And depending how consistent the results are across browsers, may be we are on our own

Using LOAD DATA INFILE with arabic data

℡╲_俬逩灬. 提交于 2019-12-24 00:54:28
问题 I am trying to import a .csv file into a table. I have figured out how to get the data inserted by using the following query: LOAD DATA INFILE 'examplesofdata.csv' INTO TABLE coins FIELDS TERMINATED BY ',' ENCLOSED BY '' ESCAPED BY '\\' IGNORE 1 LINES; However for several of my fields I have Arabic content which gets entered as a series of ? I assume this is because I haven't collated the database correctly or I don't fully understand the LOAD DATA INFILE query. Any advice would be greatly

What is it about AA and Danish Collation?

孤街浪徒 提交于 2019-12-24 00:39:02
问题 I have the following Perl script, intended to show collation in Danish. #!/usr/local/ActivePerl-5.16/bin/perl use 5.014_001; use utf8; use Unicode::Collate; use strict; use warnings; use Carp; use Data::Dump; use Encode qw( encode_utf8 ); use Unicode::Collate::Locale; binmode STDOUT, ':encoding(UTF-8)'; my @words =("AAI Document Type", "Apple", "Zebra"); my $coll = Unicode::Collate::Locale->new(locale => "da"); my @result = $coll->sort(@words); foreach my $item (@result){ print $item, "\n"; }