在PostgreSQL中使用某些Unicode范围(例如西里尔字母)查找所有行? [英] Find all rows using some Unicode range (such as Cyrillic characters) with PostgreSQL?

查看:67
本文介绍了在PostgreSQL中使用某些Unicode范围(例如西里尔字母)查找所有行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何查找PostgreSQL表中包含某些Unicode范围内的字符(例如西里尔字母)的所有行?

How do I find all rows of a PostgreSQL table that contain characters in some Unicode range, such as Cyrillic characters?

推荐答案

想通了!对于西里尔字母:

Figured it out! For Cyrillic:

SELECT * FROM "items" WHERE (title SIMILAR TO '%[\u0410-\u044f]%')

我从 http://symbolcodes.tlt.psu.edu/bylanguage/cyrillicchart.html 。字符有十六进制实体А я ,这也是我上面的数字。

I got the range from http://symbolcodes.tlt.psu.edu/bylanguage/cyrillicchart.html. The characters have hex entities А to я, which are also my numbers above.

这篇关于在PostgreSQL中使用某些Unicode范围(例如西里尔字母)查找所有行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆