arabic

In Xcode, how to display text merging English+Arabic and beginning with Arabic?

女生的网名这么多〃 提交于 2019-12-03 03:20:09
问题 I want to set a label to string: "خخخ just bought: Disguise Kit." but when I run the test, the label show ".just bought: Disguise Kit خخخ"? If the text is not begin with Arabic, It will show as what I set. What's the problem? Does anybody know how to deal with this issue? 回答1: First, read Cal Henderson's excellent "Understanding Bidirectional (BIDI) Text in Unicode.". Believe it or not, UILabel is laying it out the way you asked. You've provided a right-to-left string (starting in Arabic). It

set JFrame Orientation from right to left!

浪尽此生 提交于 2019-12-02 22:58:33
To align my JFrame from righ-to-left, I use: setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); but this works only if I use the following style (decoration) of the JFrame: public class RightToLeft { public static void main(String []args){ javax.swing.SwingUtilities.invokeLater(new Runnable(){ public void run() { try { UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } catch (Exception e) { e.printStackTrace(); } JFrame.setDefaultLookAndFeelDecorated(true); JFrame frame = new JFrame("العنوان بالعربي"); frame.setComponentOrientation(ComponentOrientation

Regular Expression not to allow numbers - just Arabic letters

徘徊边缘 提交于 2019-12-02 17:46:44
I found this regular expression for Arabic letters but it is also allowing numbers with letters. How can I change it to let it allow letters only ? /[\u0600-\u06FF]/ Probably you'd have to check what range the numbers match and exclude it (formally not include in brackets expression). Here I've found another helpful source. I'd suggest this for only letters /[\u0600-\u065F\u066A-\u06EF\u06FA-\u06FF]/ as this matches arabic digits only /[\u0660-\u0669\u06F0-\u06F9]/ Edit: I've found that there are two ranges for arabic and arabic-indic digits in unicode. If you need a regex to match a line just

In Xcode, how to display text merging English+Arabic and beginning with Arabic?

不打扰是莪最后的温柔 提交于 2019-12-02 16:52:17
I want to set a label to string: "خخخ just bought: Disguise Kit." but when I run the test, the label show ".just bought: Disguise Kit خخخ"? If the text is not begin with Arabic, It will show as what I set. What's the problem? Does anybody know how to deal with this issue? Rob Napier First, read Cal Henderson's excellent "Understanding Bidirectional (BIDI) Text in Unicode." . Believe it or not, UILabel is laying it out the way you asked. You've provided a right-to-left string (starting in Arabic). It starts displaying that right to left. You then embedded a left-to-right English string, which

Arabic in Qt with QString

坚强是说给别人听的谎言 提交于 2019-12-02 16:15:15
问题 I want to add an Arabic title to my Qt application, but it didn't work. Here is my code: #include "mainwindow.h" #include <QtGui/QApplication> #include <QString> #include <QTextStream> int main(int argc, char *argv[]) { QApplication a(argc, argv); mainWindow w; QString appTitle("تجربه"); w.setWindowTitle(appTitle); w.show(); return a.exec(); } And here is the output: How can I correct it? 回答1: That looks like a typical "UTF-8 interpreted as ISO-8859-1" encoding issue. In fact it's a "CP1256

Updating text of a pdf, cannot replace string with Arabic word - itext Java

时光怂恿深爱的人放手 提交于 2019-12-02 15:35:47
问题 I am reading a pdf and updating the text of the pdf. It seems to work fine when I replace it with English word but when I replace it with Arabic word, it doesn't work. In my case, the PdfObject would always be of type Indirect so dict.get(PdfName.CONTENTS).isArray() would be false in all cases public static void manipulatePdf(String src, String dest) throws IOException, DocumentException { PdfReader reader = new PdfReader(src); PdfDictionary dict = reader.getPageN(1); PdfObject object = dict

Saving Segmentation Result Automatically - Matlab Arabic OCR

谁说我不能喝 提交于 2019-12-02 13:28:32
问题 Complete Segmentation code: % Preprocessing + Segmentation % // Original Code of Segmentation by Soumyadeep Sinha with several modification by Ana// % Saving each single segmented character as one file function [s] = seg (a) myFolder = 'D:\1. Thesis FINISH!!!\Simulasi I\Segmented Images'; % a = imread ('adv1.png'); % Binarization % level = graythresh (a); b = im2bw (a, level); % Complement % c = imcomplement (b); % Morphological Operation - Dilation % se = strel ('square', 1); % se = strel(

Arabic in Qt with QString

我只是一个虾纸丫 提交于 2019-12-02 12:50:45
I want to add an Arabic title to my Qt application, but it didn't work. Here is my code: #include "mainwindow.h" #include <QtGui/QApplication> #include <QString> #include <QTextStream> int main(int argc, char *argv[]) { QApplication a(argc, argv); mainWindow w; QString appTitle("تجربه"); w.setWindowTitle(appTitle); w.show(); return a.exec(); } And here is the output: How can I correct it? That looks like a typical "UTF-8 interpreted as ISO-8859-1" encoding issue. In fact it's a "CP1256 interpreted as Latin1" issue. On Windows, with a non-Unicode codepage, try the following: QString appTitle =

How do browsers deal with “Tofu” characters

喜欢而已 提交于 2019-12-02 12:42:11
问题 character. I am using the Orbitron font in a hybrid Cordova/Android app that I am creating - quite simply because it is compact and has the clean, futuristic look that I am after. However, I realized not so long ago that Orbitron is a rather limited font with support for little more than the basic latin character set. I was about to embark on a switch to the Noto * family of fonts that have been created by Google so there is No more Tofu - tofu beign the term used by typographers to describe

Typing Arabic numbers in JTextField

半世苍凉 提交于 2019-12-02 12:34:27
问题 I am trying to type Arabic numbers in a JTextField and I used DocumentListener as follows: txtName.getDocument().addDocumentListener(this); ... public void insertUpdate(DocumentEvent e){setLabel();} public void removeUpdate(DocumentEvent e){setLabel();} public void changedUpdate(DocumentEvent e){} public void setLabel() { String s = txtName.getText(); s = s.replace('0','\u0660'); s = s.replace('1','\u0661'); s = s.replace('2','\u0662'); s = s.replace('3','\u0663'); s = s.replace('4','\u0664')