无法在 iPhone 上使用阿拉伯语键盘搜索波斯语文本 [英] can't search in farsi text with arabic keyboard on iphone

查看:31
本文介绍了无法在 iPhone 上使用阿拉伯语键盘搜索波斯语文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近为 iphone 开发了一本书,并在这个应用程序中实现了搜索功能.但在真正的 iphone 上测试了该应用程序后,我想知道它无法找到所有搜索词.(在我的 Mac 上使用波斯语键盘)

I have recently developed a book for iphone and implemented search function in this app. but after testing the app on a real iphone I wondered it cant find all of the search Terms. (using farsi keyboard on my mac)

例如它无法找到包含ی"字符的单词,因为搜索词包含从 iphone 阿拉伯语键盘插入的ي"字符!!

for example it cant find words containing "ی" character because the search terms contains "ي" character which is inserted from iphone arabic keyboard!!

我的文字很多,我找不到所有这些相似的字符!!

my texts are a lot and I cant find all of theses similar characters!!

有什么方法可以将我的波斯语文本转换为阿拉伯语文本吗?

Is there any way to convert my farsi text to arabic text?

推荐答案

我用这个方法解决了这个问题:

I fix the issue with this method:

- (NSString *)correctSearchTermCharcters:(NSString *)searchTerm
{
    return [searchTerm stringByReplacingOccurrencesOfString:@"ي" withString:@"ی"];
}

如果需要,可以替换更多字符.

if you need you can replace more characters.

这篇关于无法在 iPhone 上使用阿拉伯语键盘搜索波斯语文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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