Methods for Encoding-conversions. You should not need to use any of these.
# File lib/spreadsheet/encodings.rb, line 28 def build_output_encoding(to_encoding) [to_encoding, Spreadsheet.enc_translit, Spreadsheet.enc_ignore].compact.join('//') end
# File lib/spreadsheet/encodings.rb, line 9 def client string, internal='UTF-16LE' string = string.dup string.force_encoding internal string.encode Spreadsheet.client_encoding end
# File lib/spreadsheet/encodings.rb, line 14 def internal string, client=Spreadsheet.client_encoding string = string.dup string.force_encoding client string.encode('UTF-16LE').force_encoding('ASCII-8BIT') end
# File lib/spreadsheet/encodings.rb, line 19 def utf8 string, client=Spreadsheet.client_encoding string = string.dup string.force_encoding client string.encode('UTF-8') end