collation

How do you set the Collation for a SPARQL query?

試著忘記壹切 提交于 2020-01-24 13:22:25
问题 I am a Java developer working with a MarkLogic database. A key function of my code is its capacity to dynamically generate 4-6 SPARQL queries and run them via HTTP GET requests. The results of each are added together and then returned. I now need these results sorted consistently. Since I am paging the results of each query (using the LIMIT and OFFSET statements) each query has its own ORDER BY statement. Without embedding sorting into the queries the pages of results will be returned out of

SQL Server - To search case insensitive where the COLLATE Latin1_General_CS_AS is set

邮差的信 提交于 2020-01-16 05:32:08
问题 Parent question - Thanks to Iamdave, part of the problem is solved. Now the challenge is to make the search case insensitive in the db where the following collation is set already: COLLATE Latin1_General_CS_AS I am using this query and it is not working - couldn't match test, Test, could match only TEST UPDATE dbo.BODYCONTENT SET BODY = LTRIM(RTRIM(REPLACE( REPLACE( REPLACE(N' ' + CAST(BODY AS NVARCHAR(MAX)) + N' ', ' ', '<>'), '>TEST<', '>Prod<'), '<>', ' '))) FROM dbo.BODYCONTENT WHERE BODY

MySQL collation for Portugese

三世轮回 提交于 2020-01-16 00:42:05
问题 Is there a way in MySQL to have character collated as per the Portugese language? In the same way there is utf8_spanish_ci or Spanish. Or is there a way to add new collations? There are the following characters: ç (Gonçalves) ã (Guimarães) õ (Simões) â (Tânger) ô (Pôrto) ê (Gouvêa) é (Féria) í (Vinícius) ó (Grijó) ú (Araújo) á (Tomás) ñ (Núñez) When using utf8_general_ci searching for 'Gonçalves' would also return 'Goncalves'. I need these to be treated separately by MySQL. 回答1: Please check

Sort order of blob list in Azure

泪湿孤枕 提交于 2020-01-15 10:44:08
问题 The List Blobs article on MSDN says that: Blobs are listed in alphabetical order in the response body, with upper-case letters listed first. However, alphabetical ordering depend on which culture they're using, or is there a precise meaning of alphabetical order that they are implicitly referring to? I want to know the exact ordering scheme. I'm guessing (and hoping) that they are using the ordinal (binary) sorting rules, equivalent to StringComparison.Ordinal in .NET. 回答1: Yes , you are

Sort order of blob list in Azure

邮差的信 提交于 2020-01-15 10:42:47
问题 The List Blobs article on MSDN says that: Blobs are listed in alphabetical order in the response body, with upper-case letters listed first. However, alphabetical ordering depend on which culture they're using, or is there a precise meaning of alphabetical order that they are implicitly referring to? I want to know the exact ordering scheme. I'm guessing (and hoping) that they are using the ordinal (binary) sorting rules, equivalent to StringComparison.Ordinal in .NET. 回答1: Yes , you are

MySQL setting for correct character and collation in Laravel

扶醉桌前 提交于 2020-01-15 05:14:07
问题 I am using external DB(read only) with local DB(test system). So everytime I getting as below exception warning with default null charater like "�" when getting data from external DB. How should I modify DB setting in my situation? Thanks. (3/3) QueryException SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF8peri ...' for column 'customer_name' at row 1 (SQL: insert into customers ( id , customer_name , customer_email ) values (10008, Ol**n N***n K***t�pe AS, n***n@k***t.no))

Collator doesn't sort right for given Locale

久未见 提交于 2020-01-13 09:48:46
问题 Here's the locale alphabet order: wikipedia Here's my code: public static void main(String[] args) { Locale loc = new Locale("sr","RS"); Collator col = Collator.getInstance(loc); col.setStrength(Collator.SECONDARY); List<String> slova = new ArrayList<String>(); slova.add("Austrija"); slova.add("Slovačka"); slova.add("Č"); slova.add("Đ"); slova.add("C"); slova.add("Grčka"); slova.add("Slovenija"); slova.add("Španija"); slova.add("Švajcarska"); slova.add("Švedska"); slova.add("Srbija");

Achieving consistent sorting between c# and SQL using CollationInfo.Comparer

耗尽温柔 提交于 2020-01-11 10:03:07
问题 I am attempting to use CollationInfo.Comparer from SMO to get my c# code to sort like SQL Server. I have gotten the correct collation, but my items still do not sort correctly. var collationInfo = CollationInfo.Collations.Single(x => x.Name == "SQL_Latin1_General_CP1_CS_AS") as CollationInfo; var comparer = collationInfo.Comparer; int c = comparer.Compare("Tri-Valley L", "Trimble L"); In this case c returns '1' indicating that Tri-Valley L will come after Trimble. However this code in SQL

mysql varbinary vs varchar

这一生的挚爱 提交于 2020-01-10 05:09:08
问题 We use varchar(255) for storing "keywords" in mysql. We are facing a problem that mysql ignores all trailing spaces for comparison purposes in "=". It does respect trailing spaces in "like" comparison, but it does not let us store same word with and without trailing spaces in a varchar column if it has a "UNIQUE" index over it. So, we are considering switching to varbinary. Can anybody suggest what could be the implications when there are multi-byte characters in column values? 回答1: Andomar,

Is this a safe way to convert MySQL tables from latin1 to utf-8?

核能气质少年 提交于 2020-01-10 03:49:12
问题 I need to change all the tables in one of my databases from latin1 to utf-8 (with utf8_bin collation). I have dumped the database, created a test database from it, and run the following without any errors or warnings for each table: ALTER TABLE tablename CONVERT TO CHARSET utf8 COLLATION utf8_bin Is it safe for me to repeat this on the real database? The data seems fine by inspection... 回答1: There are 3 different cases to consider: The values are indeed encoded using Latin1 This is the