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 102428 - I18N - wont install on solaris if user in other locale
Summary: I18N - wont install on solaris if user in other locale
Status: VERIFIED FIXED
Alias: None
Product: installer
Classification: Unclassified
Component: NBI (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Kirill Sorokin
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2007-04-25 06:47 UTC by Ken Frank
Modified: 2007-05-23 05:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
installer log file with exceptions (63.91 KB, text/plain)
2007-04-25 06:48 UTC, Ken Frank
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2007-04-25 06:47:34 UTC
1. happens on solaris, not windows

2. happens in other locale - tried ja and fr

3. am not using pseudo localized nbi installer engine bundles or component bundles

4. am not choosing dirs to install into that have any mbyte characters in them
or paths to them

5. when get to summary panel, bottom has error msg
Unknown error: String index out of range: -1

6. . the attached log shows the exception - it starts happening once on summary
panel and each time mouse refocus on that panel or when click back.

7. when click back from summary panel, get a popup that tells same msg
as in #5. and then cant go back any further, button not active.
Comment 1 Ken Frank 2007-04-25 06:48:27 UTC
Created attachment 41600 [details]
installer log file with exceptions
Comment 2 Ken Frank 2007-04-25 06:49:30 UTC
exceptions in the log file start with

[2007-04-24 22:40:03.141]:     java.lang.StringIndexOutOfBoundsExc
eption: String index out of range: -1
[2007-04-24 22:40:03.141]:      at java.lang.String.substring(Stri
ng.java:1932)
[2007-04-24 22:40:03.141]:      at java.lang.String.substring(Stri
ng.java:1905)
[2007-04-24 22:40:03.141]:      at org.netbeans.installer.utils.sy
stem.UnixNativeUtils.getFileSystemRoots(UnixNativeUtils.java:448)
[2007-04-24 22:40:03.142]:      at org.netbeans.installer.utils.Sy
stemUtils.getFileSystemRoots(SystemUtils.java:610)
[2007-04-24 22:40:03.142]:      at org.netbeans.installer.wizard.c
omponents.panels.netbeans.NbPreInstallSummaryPanel$NbPreInstallSum
maryPanelSwingUi.validateInput(NbPreInstallSummaryPanel.java:272)
[2007-04-24 22:40:03.142]:      at org.netbeans.installer.wizard.c
omponents.panels.ErrorMessagePanel$ErrorMessagePanelSwingUi.update
ErrorMessage(ErrorMessagePanel.java:176)
[2007-04-24 22:40:03.142]:      at org.netbeans.installer.wizard.c
omponents.panels.ErrorMessagePanel$ErrorMessagePanelSwingUi.initia
lize(ErrorMessagePanel.java:162)
[2007-04-24 22:40:03.142]:      at org.netbeans.installer.wizard.c
omponents.panels.netbeans.NbPreInstallSummaryPanel$NbPreInstallSum
maryPanelSwingUi.initialize(NbPreInstallSummaryPanel.java:266)
...
...
Comment 3 dlipin 2007-04-25 07:56:57 UTC
We thought that "df" unix command could be localized on some systems but never 
seen it before. We should definitely take care of such a case..
Comment 4 Kirill Sorokin 2007-04-25 08:43:27 UTC
I guess we should be defining the LANG environment property for the 'df' command.
Comment 5 Kirill Sorokin 2007-04-25 09:10:26 UTC
We should be correcting the environment for the 'df' command, namely we should
be setting the following environment properties:
    LANG=C
    
    LC_COLLATE=C
    LC_CTYPE=C
    LC_MESSAGES=C
    LC_MONETARY=C
    LC_NUMERIC=C
    LC_TIME=C

If we set these, the environment would be english and the messages from the df
command would be the same as we expect.
Comment 6 Kirill Sorokin 2007-04-25 12:54:51 UTC
-> FIXED
Comment 7 Ken Frank 2007-04-25 16:04:05 UTC
several comments

- when running in other locale that does not have localized results/words from
df command, the problem does not happen

- would setting those LC_ vars for df command have impact on user not seeing
localized msgs when the time comes for real localized installers ?

- Also, and this is probably unrelated to this issue,
we can assume users might have paths and filenames that have multibyte
or non ascii, even if they dont install into such a dir.

- BTW, for nb, it was not allowed to install into a dir/path that had non ascii -
this was never mentioned in docs/RN but bugs filed on this were always
closed with this statement.

Is it true for nbi installer ?  If so, wonder if some checking and warning msg
can happen and not allow installer to proceed if user input this for ide and GF
dirs ?  let me know if issue on this should be filed.

ken.frank@sun.com

Comment 8 Kirill Sorokin 2007-04-25 16:13:02 UTC
Ken,

setting of the LC_* variables has effect only on the particular process that
will be executed and will have no impact on any other strings in the installer
or the environment. In other words, the variables are set only for the 'df' process.

Regarding installing to multibyte directories.. The intention is to allow this,
unless the IDE is not functioning if installed to such a directory. This said
until we get a bug that the IDE itself is not working from a localized path, we
will allow installing into such directories. I assume that it is possible now.
Comment 9 Ken Frank 2007-04-26 02:10:49 UTC
for linux, I don't see a C locale in /usr/lib/locale like on solaris; it might
be C is a known posix locale value/alias for en, but if not,
then for linux, or at least RH, its en_US.  C is a default posix locale but I
don't know
if that means that its always viewed as english one.

for mac, I dont know what values are used for locale since its set via a UI,
but perhaps C not used on that also as the default ?

ken.frank@sun.com
Comment 10 Kirill Sorokin 2007-04-26 05:22:19 UTC
Ken, yes, this is a concern. Therefore for M9 we have switched to a
locale-independent way of obtaining the list of mountpoints (in other we words
we now parse the 'df -h' output in a slightly other way). 

Going forward we'll switch to a native call, which will solve the issue once and
forever.
Comment 11 Ken Frank 2007-05-23 05:25:40 UTC
verified

ken.frank@sun.com