SQLite中的Andr​​oid波斯语/阿拉伯语搜索带来坏结果 [英] persian/arabic search in sqlite android gives bad result

查看:144
本文介绍了SQLite中的Andr​​oid波斯语/阿拉伯语搜索带来坏结果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有SQLite数据库的一个问题。它似乎并不支持全波斯/阿拉伯字符。当我以波斯字符搜索一些领域,大部分的时间的SQLite无法识别的字符。

我将数据插入到数据库中通过HTML文件中复制它们。所以当我输入的字符串和搜索,没有结果显示。但是,如果我复制字符串和搜索,它的工作原理。

从HTML文件中的字符串是:

  

احكامخمس

键入的字符串是:

  

احکامخمس

解决方案

这些字符串是不同的。

的HTML字符串中的字符U + 0627,U + 062D和U + 0643(阿勒夫,哈,和卡夫)开始。

在输入字符串的第三个字符是不是U + 0643,但U + 06A9(Keheh)。

i have a problem with sqlite database. it seems to not support full persian/arabic characters. when i search some fields based on persian chars, most of the times Sqlite can't recognize those chars.

i insert data into database by copy them from HTML file. so when i type string and search, no result show. but if i copy string and search, it works.

The string from the HTML file is:

"احكام خمس"

The typed string is:

"احکام خمس"

解决方案

These strings are different.

The HTML string begins with the characters U+0627, U+062D, and U+0643 (Alef, Hah, and Kaf).

The third character of the typed string is not U+0643 but U+06A9 (Keheh).

这篇关于SQLite中的Andr​​oid波斯语/阿拉伯语搜索带来坏结果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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