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 148594 - I18N : Solaris startup script fails to run in en_US.UTF-8 locale with /usr/xpg4/bin/tr
Summary: I18N : Solaris startup script fails to run in en_US.UTF-8 locale with /usr/xp...
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: t_h
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-09-29 06:56 UTC by Masaki Katakai
Modified: 2008-12-22 13:44 UTC (History)
1 user (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 Masaki Katakai 2008-09-29 06:56:04 UTC
When tr of /usr/xpg4/bin is used, NetBeans startup script can not run IDE
on Solaris UTF-8 locale. ja_JP.UTF-8 is OK but it fails in other locales e.g.
en_US.UTF-8, zh_CN.UTF-8, ko_KR.UTF-8.

/usr/xpg4/bin/tr can not work properly. I tried it on opensolaris 5.11 snv_98.

/usr/gnu/bin/tr is used by default. It works.

% which tr
/usr/gnu/bin/tr

Switch to tr of /usr/xpg4/bin.

% export PATH=.:/usr/xpg4/bin:$PATH
% which tr
/usr/xpg4/bin/tr

Start NetBeans in en_US.UTF-8 locale.

% env LC_ALL=en_US.UTF-8 netbeans-6.1/bin/netbeans
expr: syntax error
netbeans-6.1/bin/netbeans[139]: [: argument expected
netbeans-6.1/bin/netbeans[141]: [: argument expected
netbeans-6.1/bin/netbeans[144]: [: argument expected
Invalid maximum heap size: -Xmxm
Could not create the Java virtual machine.
%

/usr/xpg4/bin/tr in these UTF-8 locale can not work properly
with -dc '[0-9]'. Try the following commands.

% /usr/sbin/prtconf | grep Memory | env LC_ALL=en_US.UTF-8 /usr/bin/tr -dc '[0-9]'

% /usr/sbin/prtconf | grep Memory | env LC_ALL=en_US.UTF-8 /usr/xpg4/bin/tr -dc '[0-9]'

I think /usr/bin/tr needs to be used instead in this case.

% diff netbeans-6.1/bin/netbeans netbeans-6.1/bin/netbeans.new 
128c128
<         mem=`/usr/sbin/prtconf | grep Memory | tr -dc '[0-9]'`
---
>         mem=`/usr/sbin/prtconf | grep Memory | /usr/bin/tr -dc '[0-9]'`
%
Comment 1 t_h 2008-09-29 15:54:55 UTC
f67c1c1539f1
Comment 2 Quality Engineering 2008-09-30 06:02:30 UTC
Integrated into 'main-golden', will be available in build *200809300201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f67c1c1539f1
User: Tomas Holy <t_h@netbeans.org>
Log: #148594: Solaris startup script fails to run in en_US.UTF-8 locale with /usr/xpg4/bin/tr
Comment 3 Masaki Katakai 2008-10-01 00:58:40 UTC
Verified the fix on 200809301401 build.

Thank you very much for quick fix!