collation

Set lc_monetary for PostgreSQL

青春壹個敷衍的年華 提交于 2019-12-11 07:19:26
问题 How do I set lc_monetary to show money (docs) data type as EUR? I tried: change postgresql.conf and set lc_monetary="de_DE.UTF-8@euro . PG will not start with this change (currently set to en_US.UTF-8 ) do the same through pgAdmin and psql (using set ) and I get ERROR: invalid value for parameter "lc_monetary" My current collation is en_US.UTF-8 . 回答1: Locales depend on the operating system. Check what locales are available select * from pg_collation where collname ~ any(array['DE', 'FR', 'GR

.net string comparison with collation

别说谁变了你拦得住时间么 提交于 2019-12-11 06:36:41
问题 I have 2 different strings ( XXÈ and XXE ). Is there any way to compare them using a collation (for this case, it would be UTF8 general CI - I need them to be equal)? I've seen few examples involving MSSQL or SQLLite - but this would add an unnecessary dependency to my project. So, my question is - is there any way to do this in pure .net (especially c#)? Update: Let's take any decent SQL engine as an example. You can create a table and you can select the collation for the table. In our case,

Is there a function in vb.net that will tell us whether 2 string is equivalent under UTF8 unicode collation?

我的梦境 提交于 2019-12-11 04:21:50
问题 This question is similar to How to emulate MySQLs utf8_general_ci collation in PHP string comparisons but I want the function for vb.net rather than PhP. Recently I make a lot of supposedly unique key. Some of the keys are equivalent under UTF8 unicode collation. For example, look at these 2 key: byers-street-bistro__38.15_-79.07 byers-street-bistro‎__38.15_-79.07 If I paste that into front page, and look at the source code you'll see byers-street-bistro__38.15_-79.07 byers-street-bistro‎__38

What are the characters that count as the same character under collation of UTF8 Unicode? And what VB.net function can be used to merge them?

六月ゝ 毕业季﹏ 提交于 2019-12-11 03:51:52
问题 Also what's the vb.net function that will map all those different characters into their most standard form. For example, tolower would map A and a to the same character right? I need the same function for these characters german ß === s Ü === u Χιοσ == Χίος Otherwise, sometimes I insert Χιοσ and latter when I insert Χίος mysql complaints that the ID already exist. So I want to create a unique ID that maps all those strange characters into a more stable one. 回答1: For the encoding aspect of the

Is it possible to remove mysql table collation?

我是研究僧i 提交于 2019-12-11 02:59:38
问题 In my mysql set up, tables and their columns are automatically given utf8_unicode_ci collation. However, there is one table where I want no collation. How do you set that up? Also, is it possible to remove collation from a table? Cheers 回答1: You can change the collation of a column using alter table, for example assuming your column is a VARCHAR(40) : alter table YourTable modify YourColumn varchar(40) collate utf8_bin; If you don't want any collation at all change the column type to binary,

MySQL - accent insensitive search with polish characters - UTF8

时光怂恿深爱的人放手 提交于 2019-12-11 02:38:22
问题 I found alot of answers about collation and accent insensitive search, read like 1000 of posts and articles about this problem, but did not find the answer. Does anybody know how to force mysql to search accent insensitive with ALL polish characters? Maybe anybody got a compiled collation file for that (Debian)? Please note, that: Setting collation to utf8_general_ci does not help. It does not support Ł properly. But it does ruin search order. Setting collation to utf8_unicode_ci does not

SQL Query and Unicode Issue

穿精又带淫゛_ 提交于 2019-12-11 02:37:57
问题 I have a really weird issue with Sql queries on unicode data. Here's what I've got: Sql Server Express 2008 R2 AS Table containing chinese characters/words/phrases (100,000 rows) When I run the following, I get the correct row + 36 other rows returned... when it should only be the one row: SELECT TOP 1000 [ID] ,[MyChineseColumn] ,UNICODE([MyChineseColumn]) FROM [dbo].[MyTableName] WHERE [MyChineseColumn]= N'㐅' As you'd expect, the row with 㐅 is returned, but also the following: 〇 , 宁 , 㮸 and

How to return records in correct order in PostgreSQL

帅比萌擦擦* 提交于 2019-12-11 02:29:50
问题 Query select 'T' union all select 'Z' order by 1 returns Z T but correct order should be T Z Tried in 3 different OSes Windows 2003 server "PostgreSQL 9.1.3, compiled by Visual C++ build 1500, 32-bit" Windows 7 "PostgreSQL 9.2.1, compiled by Visual C++ build 1600, 32-bit" Debian "PostgreSQL 9.1.2 on x86_64-unknown-linux-gnu, compiled by gcc-4.4.real (Debian 4.4.5-8) 4.4.5, 64-bit" Database settings are: Collation: et_EE.UTF-8 Character type: et_EE.UTF-8 How to fix this? Update Databases were

Why doesn't explicit COLLATE override database collation?

南楼画角 提交于 2019-12-11 01:28:25
问题 I am on SQL Server 2008 R2 dev, server default collation is Cyrillic_General_CI_AS Executing in SSMS SELECT 'éÉâÂàÀëËçæà' COLLATE Latin1_General_CS_AS or SELECT 'éÉâÂàÀëËçæà' COLLATE Latin1_General_CI_AI outputs eEaAaAeEc?a on(in ocntext of/use dbName) of database with default collation Cyrillic_General_CI_AS éÉâÂàÀëËçæà on database with default collation Latin1_General_CI_AS Why? 回答1: Those character literals in your queries are first converted to varchar strings under whatever collation the

How can I force the value of a MySQL query to use a particular collation?

試著忘記壹切 提交于 2019-12-11 00:29:19
问题 I want to use UUID() to generate primary keys. After some investigation, I thought this should work: INSERT INTO aTable (`id`) VALUES (UNHEX(REPLACE(UUID(),'-',''))); Where id is of the type BINARY(16) . Unfortunately, UUID() returns a value which uses the utf8_general_ci collation. The rest of my database uses utf8_unicode_ci , which means I get the following error: #1270 - Illegal mix of collations (utf8_general_ci,COERCIBLE), (utf8_unicode_ci,COERCIBLE), (utf8_unicode_ci,COERCIBLE) for