阿拉伯字符在谷歌浏览器中单独显示 [英] arabic characters are displayed separately in google chrome

查看:23
本文介绍了阿拉伯字符在谷歌浏览器中单独显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个网络应用程序,我在 jquery ui 组合框中显示阿拉伯语单词,它在 IE 和 firefox 中完美运行,但 chrome 以不同的方式显示单词!

I am developing a web app where I am displaying arabic words in a jquery ui combobox, It's working perfectly in IE and firefox,but chrome is displaying the words in separate way !

你可以在combobox和下拉列表中看到两个sony的区别

you can see the difference between the two sony in the combobox and the dropdown list

这是我的元数据

<meta http-equiv="content-type" content="text/html";charset="utf-8" />

并且使用 collat​​e 将数据存储在 sql server 中

and The data is stored in sql server using collate

推荐答案

我没有 ;)在 jquery ui 组合框 javascript 中,您将拥有此功能

I did't ;) in the jquery ui combobox javascript you will have this function

if (this.value && (!request.term || matcher.test(text))) return {
                                        label: text.replace(
                                        new RegExp("(?![^&;]+;)(?!<[^<>]*)(" +       $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<span></span>"),
                                        value: text,
                                        option: this
                                    };

我刚刚删除了gi"所以代码是

I've just removed the "gi" so the code is

if (this.value && (!request.term || matcher.test(text))) return {
                                        label: text.replace(
                                        new RegExp("(?![^&;]+;)(?!<[^<>]*)(" +       $.ui.autocomplete.escapeRegex(request.term) + ")(?![^<>]*>)(?![^&;]+;)", ""), "<span></span>"),
                                        value: text,
                                        option: this
                                    };

它现在工作得很好:D

这篇关于阿拉伯字符在谷歌浏览器中单独显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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