Postgres 13
我正在寻找一种在 postgresql 中搜索可能具有变体字符表示形式的 UTF-8 文本的方法(正确的术语是什么?即vs )。
life
我遇到匹配变体字符的问题,请考虑
-- This works as expected
select 'life' ilike '%life%' matches
-- I would like to also be able to match against this source text like this
select '' ilike '%life%' matches
Run Code Online (Sandbox Code Playgroud)
请注意,有无数的变体,我此时并不特别关心与非 ascii 可表示字符的匹配,也就是说,我认为只要最终与 匹配,我就可以从 utf-8 到 ascii 有损转换
life
。