Sqlite数据库的Unicode排序

SQLite 的 BINARY, NOCASE 和 RTRIM 内置排序方式不支持Unicode编码,导致中文无法按拼音排序。在Windows环境下,需要自定义排序序列实现Unicode排序。Android已提供'UNICODE'排序。本文介绍在WPF+实体关系模型下,如何实现忽略大小写并按Unicode排序的方法。" 133451792,19671763,编程中的Prtscr键:捕捉屏幕截图示例,"['编程语言', 'Python', '开发工具']
摘要由CSDN通过智能技术生成
Sqlite数据库内建的排序序列( collating sequence )有三种: BINARY、NOCASE和RTRIM。
以下是Sqlite.Org对这三种排序方式的描述(原文地址:http://www.sqlite.org/datatype3.html):

6.0 Collating Sequences
When SQLite compares two strings, it uses a collating sequence or collating function (two words for the same thing) to determine which string is greater or if the two strings are equal. SQLite has three built-in collating functions: BINARY, NOCASE, and RTRIM.
BINARY - Compares string data using memcmp(), regardless of text encoding.
NOCASE - The same as binary, except the 26 upper case characters of ASCII are folded to their lower case equivalents before the comparison is performed. Note that only ASCII characters are case folded. SQLite does not attempt to do full UTF case folding due to the size of the tables required.

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值