Skip to content
This repository has been archived by the owner on May 12, 2023. It is now read-only.

Commit

Permalink
fix utf-8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Josep M. Bach committed Jul 27, 2011
1 parent 10a29a3 commit 2fed8e4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/rack/webconsole/asset_helpers.rb
Expand Up @@ -48,7 +48,10 @@ def js_code

def asset(file)
@assets ||= {}
@assets[file] ||= ::File.read(::File.join(::File.dirname(__FILE__), '..', '..', '..', 'public', file))
output = ::File.open(::File.join(::File.dirname(__FILE__), '..', '..', '..', 'public', file), 'r:UTF-8') do |f|
f.read
end
@assets[file] ||= output
end
end
end
Expand Down
1 change: 1 addition & 0 deletions lib/rack/webconsole/repl.rb
@@ -1,6 +1,7 @@
# encoding: utf-8
require 'json'
require 'digest/sha1'

module Rack
class Webconsole
# {Repl} is a Rack middleware acting as a Ruby evaluator application.
Expand Down
1 change: 1 addition & 0 deletions spec/rack/webconsole/asset_helpers_spec.rb
@@ -1,3 +1,4 @@
# encoding: utf-8
require 'spec_helper'

class AssetClass
Expand Down
1 change: 1 addition & 0 deletions spec/rack/webconsole/assets_spec.rb
@@ -1,3 +1,4 @@
# encoding: utf-8
require 'spec_helper'
require 'ostruct'

Expand Down

0 comments on commit 2fed8e4

Please sign in to comment.