accent-insensitive

Questions about accent insensitivity in SQL Server (Latin1_General_CI_AS)

陌路散爱 提交于 2019-12-04 12:35:14
问题 All our databases were installed using the default collation ( Latin1_General_CI_AS ). We plan to change the collation to allow clients to search the database with accent insensitivity. Questions: What are the negatives (if any) of having an accent insensitive database? Are there any performance overheads for an accent insensitive database? Why is the default for SQL Server collation accent sensitive; why would anyone want accent sensitive by default? 回答1: Seriously, changing database

Regex - match a character and all its diacritic variations (aka accent-insensitive)

断了今生、忘了曾经 提交于 2019-11-30 20:51:48
I am trying to match a character and all its possible diacritic variations (aka accent-insensitive) with a regular expression. What I could do of course is: re.match(r"^[eēéěèȅêęëėẹẽĕȇȩę̋ḕḗḙḛḝė̄]$", "é") but that is not a general solution. If I use unicode categories like \pL I can't reduce the match to a specific character, in this case e . A workaround to achieve the desired goal would be to use unidecode to get rid of all diacritics first, and then just match agains the regular e re.match(r"^e$", unidecode("é")) Or in this simplified case unidecode("é") == "e" Another solution which doesn't

jQuery DataTables - Accent-Insensitive Alphabetization and Searching

旧城冷巷雨未停 提交于 2019-11-30 08:05:11
问题 When using jQuery DataTables is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden column but that wouldn't solve the alphabetizing issue. EDIT I tried the following: $.fn.dataTableExt.ofnSearch = function ( data ) { return ! data ? '' : typeof data === 'string' ? data .replace( /\n/g,

Regex - match a character and all its diacritic variations (aka accent-insensitive)

狂风中的少年 提交于 2019-11-30 05:16:32
问题 I am trying to match a character and all its possible diacritic variations (aka accent-insensitive) with a regular expression. What I could do of course is: re.match(r"^[eēéěèȅêęëėẹẽĕȇȩę̋ḕḗḙḛḝė̄]$", "é") but that is not a general solution. If I use unicode categories like \pL I can't reduce the match to a specific character, in this case e . 回答1: A workaround to achieve the desired goal would be to use unidecode to get rid of all diacritics first, and then just match agains the regular e re

How to compare strings with case insensitive and accent insensitive

為{幸葍}努か 提交于 2019-11-30 03:58:14
问题 How to compare strings with case insensitive and accent insensitive Alright this is done easily at SQL server However I would like to do the same at C# .NET 4.5.1. How can I do that with most proper way? I mean these 3 strings should return equal when compared http://www.buroteknik.com/metylan-c387c4b0ft-tarafli-bant-12cm-x25mt_154202.html http://www.buroteknik.com/METYLAN-C387C4B0FT-TARAFLI-BANT-12cm-x25mt_154202.html http://www.buroteknik.com/METYLAN-C387C4B0FT-TARAFLı-BANT-12cm-x25mt

MongoDB diacriticInSensitive search not showing all accented (words with diacritic mark) rows as expected and vice-versa

时光毁灭记忆、已成空白 提交于 2019-11-29 11:28:22
I have a document collection with following structure uid, name With a Index db.Collection.createIndex({name: "text"}) It contains following data 1, iphone 2, iphóne 3, iphonë 4, iphónë When I am doing text search for iphone I am getting only two records, which is unexpected actual output -------------- 1, iphone 2, iphóne If I search for iphonë db.Collection.find( { $text: { $search: "iphonë"} } ); I am getting --------------------- 3, iphonë 4, iphónë But Actually I am expecting following output db.Collection.find( { $text: { $search: "iphone"} } ); db.Collection.find( { $text: { $search:

MySQL REGEXP query - accent insensitive search

点点圈 提交于 2019-11-29 09:42:15
I'm looking to query a database of wine names, many of which contain accents (but not in a uniform way, and so similar wines may be entered with or without accents) The basic query looks like this: SELECT * FROM `table` WHERE `wine_name` REGEXP '[[:<:]]Faugères[[:>:]]' which will return entries with 'Faugères' in the title, but not 'Faugeres' SELECT * FROM `table` WHERE `wine_name` REGEXP '[[:<:]]Faugeres[[:>:]]' does the opposite. I had thought something like: SELECT * FROM `table` WHERE `wine_name` REGEXP '[[:<:]]Faug[eèêéë]r[eèêéë]s[[:>:]]' might do the trick, but this only returns the

jQuery DataTables - Accent-Insensitive Alphabetization and Searching

邮差的信 提交于 2019-11-29 06:01:15
When using jQuery DataTables is it possible to do accent-insensitive searches when using the filter? For instance, when I put the 'e' character, I'd like to search every word with 'e' or 'é', 'è'. Something that came to mind is normalizing the strings and putting them into a separate, hidden column but that wouldn't solve the alphabetizing issue. EDIT I tried the following: $.fn.dataTableExt.ofnSearch = function ( data ) { return ! data ? '' : typeof data === 'string' ? data .replace( /\n/g, ' ' ) .replace( /á/g, 'a' ) .replace( /é/g, 'e' ) .replace( /í/g, 'i' ) .replace( /ó/g, 'o' ) .replace(

Programatic Accent Reduction in JavaScript (aka text normalization or unaccenting)

[亡魂溺海] 提交于 2019-11-26 18:30:36
I need to compare 2 strings as equal such as these: Lubeck == Lübeck In JavaScript. Why? Well, I have an auto-completion field that's going out to a Java service using Lucene, where place names are stored naturally (as Lübeck), but also indexed as normalized text, import sun.text.Normalizer; oDoc.setNameLC = Normalizer.normalize(oLocName, Normalizer.DECOMP, 0) .toLowerCase().replaceAll("[^\\p{ASCII}]",""); This way some-one who doesn't know to type "Mèxico" can type "mexico" and get a match which returns "Mèxico" (among a lot of other possible hits, like "Café Mèxico, Dubai, UAE"). Now the

SQLite accent-insensitive search

爷,独闯天下 提交于 2019-11-26 17:50:14
问题 Is there any way to do an accent-insensitive LIKE query in SQLite? For example, this query: SELECT * FROM users WHERE name LIKE "Andre%" would return: André the Giant Andre Agassi etc. I'm using Qt with QSqlDatabase if it makes any difference. 回答1: Set up a collation using sqlite3_create_collation and then use it like this: SELECT * FROM users WHERE name LIKE "Andre%" COLLATE NOACCENTS 来源: https://stackoverflow.com/questions/14009261/sqlite-accent-insensitive-search