Problem with ja_JP.eucJP locale
-------------------------------

                 Key: JRUBY-4887
                 URL: http://jira.codehaus.org/browse/JRUBY-4887
             Project: JRuby
          Issue Type: Bug
          Components: Core Classes/Modules
    Affects Versions: JRuby 1.5.1
         Environment: % java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
% uname -a
Linux lambda 2.6.31-gentoo-r10 #1 SMP Sun Apr 4 12:04:25 JST 2010 i686 Intel(R) 
Core(TM)2 Duo CPU T7300 @ 2.00GHz GenuineIntel GNU/Linux

            Reporter: Masayuki Onjo


The latest git version (1f0e0d1f7dc09580d1d287799997a437a34f5684),
Jruby don't work with EUC-JP Linux locale. See below:

% LANG=ja_JP.utf8 jirb
irb(main):001:0>
% LANG=ja_JP.eucJP jirb
OSEnvironment.java:81:in `getAsMapOfRubyStrings': java.lang.NullPointerException
        from OSEnvironment.java:60:in `getEnvironmentVariableMap'
        from RubyGlobal.java:300:in `defineGlobalEnvConstants'
        from RubyGlobal.java:277:in `createGlobals'
        from Ruby.java:1080:in `init'
        from Ruby.java:173:in `newInstance'
        from Main.java:217:in `run'
        from Main.java:128:in `run'
        from Main.java:97:in `main'

I found that problem caused by getAsMapOfRubyStrings() method in 
OSEnvironment.java.

       Map envs = new HashMap();
       Encoding encoding = 
EncodingDB.getEncodings().get(Charset.defaultCharset().name().getBytes()).getEncoding();
       ...
 [debug]
  0. LANG=ja_JP.eucJP
  1. Charset.defaultCharset().name() => "x-euc-jp-linux".(#1)
  2. EncodingDB.getEncodings().get("x-euc-jp-linux") => null
  3. NullPointerException :-(

#1: http://java.sun.com/javase/6/docs/technotes/guides/intl/encoding.doc.html

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to