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.

Bug 153506 - I18N - I can't type Persian/Arabic characters
Summary: I18N - I can't type Persian/Arabic characters
Status: RESOLVED WONTFIX
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-11-20 06:45 UTC by mojtaba3000
Modified: 2008-12-15 02:59 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mojtaba3000 2008-11-20 06:45:04 UTC
when I change my keyboard layout to e.g Farsi(Persian) the editor types English characters not Persian
Comment 1 Ken Frank 2008-11-20 15:44:43 UTC
does it happen in other parts of NetBeans ?

what about for some java demo samples like 
demo/jfc/Notepad ?

ken.frank@sun.com
Comment 2 mojtaba3000 2008-11-26 20:04:33 UTC
the issue exists in all parts of NetBeans including text editor (Java, C++, ....), Java GUI Builder, database command
executer and all dialogs of NetBeans itself and ....
Comment 3 Ken Frank 2008-11-26 22:10:54 UTC
thanks for the info; now lets see if this happens with java itself or just within netbeans.

please go to your javahome dir and under that to demo dir
then run for example, Stylepad, Notepad or SwingSet2 and type into areas
that can be typed in and see if it can be done ok.


Also, are you in the Persian locale when running netbeans or these demos ? 
I don't see Persian locale as supported by jdk but do see the encoding for it supported by jdk.

And was typing Persian characters ok when keybd was previous layout (was it english ?)

am assuming that in the os terminal itself that things are ok when changing keybd layout.

ken.frank@sun.com
Comment 4 mojtaba3000 2008-11-27 06:58:19 UTC
the problem occurs in other java apps like Notepad, SwingSet2 and ...
it seems the problem is from Java than NetBeans

when I use Persian Keyboard layout , for example when I press 'a' key it types 'a' though it should types 'ش'. it
happens in java apps but in other Linux apps is OK.
I don't know whether I run java apps with Persian locale (i run java apps normally), how should i do it?
my java version is Java 6 update 10 (1.6.0_10-b33)
Comment 5 Ken Frank 2008-11-27 18:02:33 UTC
3 comments/questions:

1. at linux login screen, there is choice for language/locale - if there is choice
for Persian or related, choose it and login and try experiment again.

2. also then look at netbeans help->about and tell us what locale/encoding is being used
(actually we need this info for current case also)

3. when doing original situation with en keyboard layout and running nb, could you
type and see Persian characters ok in nb ?



after we get some more info, I'll suggest to view and post on general jdk forum
asking about this since it might have happened to others and since this seems
to be jdk related, since it not happen in other parts of your OS.

ken.frank@sun.com
Comment 6 mojtaba3000 2008-12-12 05:55:58 UTC
when I choose Persian for starting Linux, I can type Persian characters with Persian keyboard layout in both netbeans
and all other java apps in linux. in nb->help->about the locale is fa_IR and the encoding is UTF-8. but as I mentioned
before, when my Linux is in en_US locale I can type Persian in all non-java apps and the problem is with java apps.
Comment 7 Petr Dvorak 2008-12-12 09:33:43 UTC
> the problem occurs in other java apps like Notepad, SwingSet2 and ...
> it seems the problem is from Java than NetBeans

I know it might sound little hard, but I think this issue should be closed as WONTFIX as we can do nothing with it on
our side. I think it is now clear this is a JDK issue. Therefore, closing as WONTFIX for now...

You can set specific locale to IDE by using command line switch and see if it helps: netbeans --locale fa_IR

To file a report against JDK, visit this page: http://bugs.sun.com/bugdatabase/
Comment 8 Ken Frank 2008-12-12 16:17:46 UTC
mojtaba,

since it works ok in persian locale when using persian keyboard,  is there need to be in en locale to run nb for you ?


ken.frank@sun.com
Comment 9 Michel Graciano 2008-12-12 16:28:46 UTC
Maybe related with http://www.netbeans.org/issues/show_bug.cgi?id=143830
Comment 10 Petr Dvorak 2008-12-12 17:16:41 UTC
hmichel, how are these two issues related? This one is about problem with Persian/Arabic locale, that one about
inability to type in the editor as no keys work (except for the arrow keys)...
Comment 11 mojtaba3000 2008-12-12 21:07:40 UTC
Frank,

I need to work with my linux in en_US locale and want java to work fine with Persian Language with that locale.
what can I do?
is there any way to run Java and NB with fa_IR locale not the whole Linux?
Comment 12 Ken Frank 2008-12-12 21:28:20 UTC
as to run in fa_IR locale with nb, I think that could happen
when following sugggestion below with using --locale option
to netbeans command.

but i thought that problem happened when in the fa locale when
choosing locale from login.

in this case, probably same problem might happen since java will
be given fa locale as the locale since you are using the --locale option.

--locale option might not be good in any case since it does not apply
to view of locale of app server or databases, since it just affect netbeans.

but you could try this and see if works.

also gointo terminal and change to fa locael, after starting linux in en locale,
then start nb from that terminal and see if ok.


another thing - and am not sure of it - I don't know if for nb if using in en locale
the characters of other locale might be ok as to showing them ok unless a utf-8 one,
although now with project encoding property perhaps it works ok.

question - what is it about en locale that you need to be in it from starting linux
vs being in fa locale ?

ken.frank@sun.com
Comment 13 Michel Graciano 2008-12-15 00:24:14 UTC
I am talking about this:

------- Additional comments from kiyut Fri Dec 12 07:11:21 +0000 2008 -------

On linux and ubuntu

I encounter this bug long time ago when I was still using Netbeans 5.5
and found that gnome scim have problem (stealing the focus) with my
Netbeans usage. So just remove the scim and the problem gone. And now
on Ubuntu 8.04 and Netbeans 6.5, I never use/install scim again :)

So I suspect, it is related with some application eg: Input Methods Software, etc that compete/stealing the focus from
eg: Netbeans.

And it might happend in other platform (my case is Linux and Gnome) when similar application are trying to steal focus.

------- Additional comments from kiyut Fri Dec 12 07:11:21 +0000 2008 -------

which means scim could be the problem. That issue was updated with a JDK issue link, which could help. I am not sure if
it is the cause of the problem, but maybe could help.

Regards
Comment 14 mojtaba3000 2008-12-15 02:19:39 UTC
Ken,

I need to run Linux with en locale because of the bugs in fa translation and also in linux RTL layout.
Comment 15 Ken Frank 2008-12-15 02:48:29 UTC
mojtaba,

I didn't realize netbeans had been translated for that language.

Here is what you can do to run in fa locale and not see any translation - remove the
localized files from the various directories where they are - if you can attach recursive
listing of your installed netbeans, I can note which files to remove - it would
be like ide10/modules/locale/<the translated fa jar files>, etc.

as to the rtl, I don't know if problems are about linux itself, or java handling or netbeans itself - can you
elaborate about those problems ?

ken.frank@sun.com
Comment 16 mojtaba3000 2008-12-15 02:52:23 UTC
I mean Linux translation not nb. the problem is Linux not nb.
Comment 17 mojtaba3000 2008-12-15 02:59:07 UTC
There is another issue which is unpleasant to me

whenever I want to download Neatbeans, Java and other Sun products I have problems with the restrictions that Sun impose
to Iranians (embargo). I can not understand why do you do that. but Microsoft which also is a great American Corporation
do not do it.
??