Navigation Menu

Skip to content

Commit

Permalink
Revert "Try to force BINARY encoding under 1.9"
Browse files Browse the repository at this point in the history
This reverts commit 11ea9ab.
  • Loading branch information
defunkt committed Mar 29, 2010
1 parent 4684dcf commit 2e25038
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions lib/mustache.rb
@@ -1,5 +1,3 @@
Encoding.default_external = 'BINARY' if defined? Encoding

require 'mustache/template'
require 'mustache/context'

Expand Down
7 changes: 4 additions & 3 deletions test/mustache_test.rb
@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
$LOAD_PATH.unshift File.dirname(__FILE__)
require 'helper'

Expand Down Expand Up @@ -384,12 +385,12 @@ def test_utf8
klass.template_name = 'utf8'
klass.template_path = 'test/fixtures'
view = klass.new
view[:test] = "\xE4\xB8\xAD\xE6\x96\x87"
view[:test] = "中文"

assert_equal <<-rendered, view.render
<h1>\xE4\xB8\xAD\xE6\x96\x87 \xE4\xB8\xAD\xE6\x96\x87</h1>
<h1>中文 中文</h1>
<h2>\xE4\xB8\xAD\xE6\x96\x87\xE5\x8F\x88\xE6\x9D\xA5\xE5\x95\xA6</h2>
<h2>中文又来啦</h2>
rendered
end
end

0 comments on commit 2e25038

Please sign in to comment.