����JFIF��x�x����'
Server IP : 78.140.185.180 / Your IP : 18.116.23.178 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cpanel/ea-ruby27/root/usr/share/ruby/ruby-2.7.8/rexml/ |
Upload File : |
# coding: US-ASCII # frozen_string_literal: false module REXML module Encoding # ID ---> Encoding name attr_reader :encoding def encoding=(encoding) encoding = encoding.name if encoding.is_a?(Encoding) if encoding.is_a?(String) original_encoding = encoding encoding = find_encoding(encoding) unless encoding raise ArgumentError, "Bad encoding name #{original_encoding}" end end return false if defined?(@encoding) and encoding == @encoding if encoding @encoding = encoding.upcase else @encoding = 'UTF-8' end true end def encode(string) string.encode(@encoding) end def decode(string) string.encode(::Encoding::UTF_8, @encoding) end private def find_encoding(name) case name when /\Ashift-jis\z/i return "SHIFT_JIS" when /\ACP-(\d+)\z/ name = "CP#{$1}" when /\AUTF-8\z/i return name end begin ::Encoding::Converter.search_convpath(name, 'UTF-8') rescue ::Encoding::ConverterNotFoundError return nil end name end end end