Class: Ungarbled::Encoder::Ja

Inherits:
Base
  • Object
show all
Defined in:
lib/ungarbled/encoder/ja.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Ungarbled::Encoder::Base

Instance Method Details

#encode(filename) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/ungarbled/encoder/ja.rb', line 8

def encode(filename)
  if @browser.ie?
    ::ERB::Util.url_encode(filename)
  else
    super
  end
end

#encode_for_zip_item(filename) ⇒ Object



16
17
18
19
20
21
22
# File 'lib/ungarbled/encoder/ja.rb', line 16

def encode_for_zip_item(filename)
  if @browser.windows? && !@browser.windows8?
    filename.encode('cp932', invalid: :replace)
  else
    super
  end
end