# Apparent Jruby 1.6.7.2 Encoding bug

**URL:** <https://www.ruby-forum.com/t/apparent-jruby-1-6-7-2-encoding-bug/223407>\
**Category:** JRuby\
**Created:** [October 3, 2012, 3:21am UTC](https://www.ruby-forum.com/t/apparent-jruby-1-6-7-2-encoding-bug/223407 "2012-10-03T03:21:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [October 3, 2012, 3:21am UTC](https://www.ruby-forum.com/t/apparent-jruby-1-6-7-2-encoding-bug/223407/1 "2012-10-03T03:21:59Z")

</div>

Ahoi all.

In the process of writing a gem I came across this failing test.

> **[Home – Travis-CI](https://www.travis-ci.com/)**
>
> Simple YAML configs

The test in question comes from the ActiveSupport logger tests of the  
main rails suite but has been copied into my repository.

The test code is here:

> <https://github.com/rurounijones/yarder/blob/master/test/logger_test.rb#L114>

On MRI 1.93 and jruby 1.7.0.RC1 this passes.

However on 1.6.7.2 it fails due to line 117 expecting a UTF-8 encoded  
string but actually getting an ACII-8BIT one.

The fact that it works on JRuby 1.7.0 leads me to believe that this is a  
known issue and has been fixed. I also assume  
that 1.6.7 will not receive this fix or it would have already (I cannot  
believe I am the first to find this).

If I am incorrect and there is a different reason / solution to this  
problem I would be grateful if someone could point it out.

cheers

Jeff

---

<div class="post-metadata">

**Author:** ![jeffrey25](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@jeffrey25](https://www.ruby-forum.com/u/jeffrey25)\
**Post date:** [October 3, 2012, 3:26am UTC](https://www.ruby-forum.com/t/apparent-jruby-1-6-7-2-encoding-bug/223407/2 "2012-10-03T03:26:05Z")

</div>

We (not me personally, but Tom Enebo and others) did a lot of work on  
Encoding for the 1.7 branch. So this particular problem may very well be  
fixed.

We also released 1.6.8 a while back, and that may contain the fix you  
need. If you need the 1.6.x release, give that a shot.

---

<div class="post-metadata">

**Author:** ![jeffrey25](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/ce7236/32.png) [@jeffrey25](https://www.ruby-forum.com/u/jeffrey25)\
**Post date:** [October 3, 2012, 4:08am UTC](https://www.ruby-forum.com/t/apparent-jruby-1-6-7-2-encoding-bug/223407/3 "2012-10-03T04:08:08Z")

</div>

Hello Hirotsugu-san

Heh, I managed to totally forget that there was a 1.6.8 release. I just  
tested it on that locally and it also failed with the same problem.

I am not wrenching my heart out about this because it would probably  
only affect people trying to log non-ascii data on JRuby 1.6.x, I have  
no qualms about saying “MRI 1.9.3 & JRuby 1.7 (1.6.X if you only log  
ascii)”

I was just wanting to make sure that it wasn’t a moment of idiocy on my  
part.

Cheers

Jeff
