Class: Ungarbled::Encoder::Ja

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

Instance Method Summary collapse

Methods inherited from Base

#encode, #initialize

Constructor Details

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

Instance Method Details

#encode_for_zip_item(filename) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/ungarbled/encoder/ja.rb', line 6

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