JRuby 1.0 assumes Ruby string to be UTF-8

| | Comments (0) | TrackBacks (0)

Charles Nutter가 Paving the Road to JRuby 1.0: Unicode 글에서 JRuby 1.0에서는 Java와 Ruby 사이에 문자열이 전달될 때는 Ruby 문자열이 UTF-8로 인코딩되어있다고 가정하는 정책으로 가겠다는 의지를 밝혔습니다. Charles Nutter가 설명하는대로, Java 문자열과 Ruby 문자열의 고유한 방식을 보존하는 한, 이러한 방식이 거의 유일한 방식이 아닌가 합니다.

  • Ruby strings are byte[] and conform to Ruby string semantics
  • Java strings passing into Ruby code will be encoded as UTF-8, with the implication that you should expect to be working with UTF-8 byte[] in the receiving code
  • Ruby strings passing out of Ruby into Java libraries will be assumed to be UTF-8, and the resulting string on the Java side of the call will reflect that assumption.

JRuby 0.9.x의 Non-Ascii 문자열 처리 방식에 실망하고, 당분간 아예 Unicode 지원에 대한 의지가 전혀 없는 줄 알았는데, 그나마 다행입니다. JRuby에서의 Ruby 2.x 문자열 구현을 시작한다는데, Ruby 2.x 문자열의 Unicode 지원은 어떻게 될 지 궁금하군요.

0 TrackBacks

Listed below are links to blogs that reference this entry: JRuby 1.0 assumes Ruby string to be UTF-8.

TrackBack URL for this entry: http://lastmind.net/mt/mt-tb.cgi/380

Leave a comment

About this Entry

This page contains a single entry by Joseph Jang published on April 13, 2007 5:20 AM.

스프링노트: 첫 인상 was the previous entry in this blog.

Monopoly and Innovation is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.21-en