This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This sample code will better explain the problem: /** * The Output window shows the arabic text corrupted. It seems that it uses * the ISO8559-1 character set. * */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { // notice here that I have typed the arabic text first but the editor // missplaced it while I'm typing. However, when you run the program // it will be displayed in the right order. System.out.println("نص عربي\t Arabic Text"); } }
Created attachment 25211 [details] sample project that demonstrates the problem
Reassigning for evaluation.
We are unable to handle the LTR and RTL mixing of the text properly yet. Setting target milestone to future for now.
I'm making a FEATURE from this issue as we need to review the present support for RTL text in the javax.swing.text package and make a planning of how and when we will implement it.
Is this something that can be looked at again for nb6 timeframe ? ken.frank@sun.com
I personally can see two issues in this report: 1. LTR/RTL text handling in editor 2. Output window not showing the arabic characters properly Is that right? If so, I would suggest to leave this issue for tracking #1 and file another one for core/output to fix #2. They are indepenedent issue, fixes need to be done in completely different modules, the complexity of the fixes is likely to be different and therfore their timeframe is probably going to be different too.
I can file the 2nd issue - can the filer of issue confirm there is problem also with how arabic is shown in output window and include a gif ? Also, there is another separate possible issue about window applications created using form designer in that, for menus at least, they are not shown as per locale without additional kind of coding needed - ie they are shown left to right as in en or other locales and not rtl as should be in arabic locale. This might be jdk issue since seems to need to give the explicit api of text direction, but dont know its a bug in jdk or if its expected,but it seems that for nb, it should provide code for user that takes care of this and as per locale. Am investigating and can file something on form designer. ken.frank@sun.com
Created attachment 38888 [details] Arabic text support in Netbeans 5.5
I found out that the IDE prints the Arabic text correctly and in the right order after I set my OS (Windows XP) locale to "Arabic (Saudi Arabia)". I've tried different combinations of mixed Arabic and English text and the result was just fine. The remaining issue now is with the editor itself. Manipulating Arabic text is still difficult. To give an example, if you try to highlight an Arabic character, you have to guess its position on the line. A snapshot has been attached [nb5.5_arabic_support.gif].
see also 96333 and 96472 related to having ide/platform and form editor use the locale user is in for determining orientation of menus and other applicable ui objects as to right to left or left to right layout. ken.frank@sun.com
Ok, so just to clarify, the #2 is working fine. Thanks for the report.
I believe that issue number 2 is not a problem anymore. However, I suggest to have it configurable on the IDE level or even on the project level. Because, sometimes, I need to work on projects that support Arabic while I want to keep my OS locale set to English. Be aware that eclipse does not have this problem. In eclipse, you can set the encoding on the project level. Thanks.
In php files and html files all texts in arabic are hard to select and hard to modify , the text is just chaos. IDE does not handle arabic text properly
Is this issue still under development (I see it has a "started" status)? It seems to me selection has issues with mixed arabic-english text, possibly char deletion too.
(In reply to comment #14) > Is this issue still under development (I see it has a "started" status)? Yes, there was a replacement of view hierarchy (text rendering mechanism) so things might change due to that. > It seems to me selection has issues with mixed arabic-english text, possibly > char deletion too. Could you please download a recent Dev build and describe in steps the main problems? Thanks.
Created attachment 110094 [details] Movie showing the arabic selection in the output window The attached QuickTime movie shows the text selection in a recent dev build. Selection in the editor is a bit different, but still looks incorrect.
Created attachment 116525 [details] Example IDE does not handle arabic text properly Example IDE does not handle arabic text properly
I'll attempt to fix the problem in 7.3 by using getLogicalRangesForVisualSelection() in TextLayout and related methods in case TL.isLeftToRight() returns true.
Created attachment 123798 [details] no arabic language
Miroslav, good luck, I can test it if you want.
(In reply to comment #17) > Created attachment 116525 [details] > Example IDE does not handle arabic text properly > > Example IDE does not handle arabic text properly Could you please paste the text from the attached picture into the issue so that I can paste it into NB for testing? Thanks.
I've tried several unsuccessful solutions but finally I had to resign on using mixed text capabilities of TextLayout and split a text containing RTL sections into multiple text layouts (JDK's plain text eidtor uses similar approach). I've also improved getNextVisualPosition() of the views. I do not close the issue yet - once the fix appears in dev builds I'll first need testing from someone using RTL languages daily. I only test by iterating over the following text: System.out.println("نص عربي\t Arabic Text"); http://hg.netbeans.org/jet-main/rev/82a545b61c94
Miloslav, How can I see when there will be a development build that includes this fix? (In reply to comment #22) > I've tried several unsuccessful solutions but finally I had to resign on using > mixed text capabilities of TextLayout and split a text containing RTL sections > into multiple text layouts (JDK's plain text eidtor uses similar approach). > I've also improved getNextVisualPosition() of the views. > > I do not close the issue yet - once the fix appears in dev builds I'll first > need testing from someone using RTL languages daily. > I only test by iterating over the following text: > > System.out.println("نص عربي\t Arabic Text"); > > http://hg.netbeans.org/jet-main/rev/82a545b61c94
Integrated into 'main-golden', will be available in build *201301250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/82a545b61c94 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #65158 - I18N - IDE does not handle arabic text properly.
It's better. I've created screen capture to illustrate some problems in current build. ://www.youtube.com/watch?v=_8NS1ggDQZU&feature=youtu.be Thanks for watching :)
The "jumping" effect you demonstrated for Hebrew text are present for regular English text as well. In a Java source file that uses hard tabs, selecting a few lines and pressing tab (which indents those lines) is causing *really* weird effects.
(In reply to comment #26) > The "jumping" effect you demonstrated for Hebrew text are present for regular > English text as well. In a Java source file that uses hard tabs, selecting a > few lines and pressing tab (which indents those lines) is causing *really* > weird effects. So the bug should be easier to fix. There is one other bug which is shown when trying to type word "אחד" (one) and then pressing Enter - the order of characters breaks.
Apologies the "jumping text", it's already fixed (today) as issue #225347. Once the "Integrated into 'main-golden' ..." message appears for 225347 could you please download the particular dev build and re-test the things? Thanks.
(In reply to comment #28) > Apologies the "jumping text", it's already fixed (today) as issue #225347. > Once the "Integrated into 'main-golden' ..." message appears for 225347 could > you please download the particular dev build and re-test the things? Thanks. I checked 20130131 , there are no jumping test or characters changing places.
So marking as fixed. If there would be any more related problems please reopen or file a new issue.
Created attachment 131346 [details] persian/arabic text problem netbeans does not show persian/arabic text properly in tags with attributes in html .
I just downloaded nb7.3 and i was gonna work with a php file that contains lines with arabic, all i see are square characters, when i paste them elsewhere they are readable, but in netbeans they aren't.
This bug was fixed in trunk builds only ! Please download it from : http://bits.netbeans.org/download/trunk/nightly/latest/ and let us know. We will include the fix into NB 7.3 Patch 1 (scheduled end of March) if we will get confirmation that it works
I tried the nightly build and i still had it shown as squares, then i thought of changing the font, apparently it was a font issue, so i tried the same thing on the stable 7.3 version and changed it to the same working font and it worked, I don't know what fix was in that patch but the stable version is working after changing the font, at least for me.
verified
In release73 (for patch1): 82a545b61c94 transplanted to 7d70d0e82949
Integrated into 'releases', will be available in build *201303141828* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/7d70d0e82949 User: Miloslav Metelka <mmetelka@netbeans.org> Log: #65158 - I18N - IDE does not handle arabic text properly. (transplanted from 82a545b61c94d200359ffd2e49137b94bfb2a45d)