Module Tk::Encoding
In: tk/lib/tk.rb

Methods

Constants

TkCommandNames = ['encoding'.freeze].freeze

Public Instance methods

[Source]

# File tk/lib/tk.rb, line 2313
      def encoding
        nil
      end

[Source]

# File tk/lib/tk.rb, line 2220
      def encoding
        TkCore::INTERP.encoding
      end

[Source]

# File tk/lib/tk.rb, line 2216
      def encoding=(name)
        TkCore::INTERP.encoding = name
      end

[Source]

# File tk/lib/tk.rb, line 2310
      def encoding=(name)
        nil
      end
encoding_convert_from(str, enc=nil)
encoding_convert_from(str, enc=nil)
encoding_convert_to(str, enc=nil)

Alias for encoding_convertto

encoding_convert_to(str, enc=nil)

Alias for encoding_convertto

[Source]

# File tk/lib/tk.rb, line 2236
      def encoding_convertfrom(str, enc=nil)
        # str is an usual enc string or a Tcl's internal string expression
        # in enc (which is returned from 'encoding_convertto' method). 
        # the return value is a UTF-8 string.
        enc = encoding_system unless enc
        ret = TkCore::INTERP.__invoke('encoding', 'convertfrom', enc, str)
        ret.instance_variable_set('@encoding', 'utf-8')
        ret
      end

[Source]

# File tk/lib/tk.rb, line 2326
      def encoding_convertfrom(str, enc=None)
        str
      end

[Source]

# File tk/lib/tk.rb, line 2331
      def encoding_convertto(str, enc=None)
        str
      end

[Source]

# File tk/lib/tk.rb, line 2247
      def encoding_convertto(str, enc=nil)
        # str must be a UTF-8 string.
        # The return value is a Tcl's internal string expression in enc. 
        # To get an usual enc string, use Tk.fromUTF8(ret_val, enc).
        enc = encoding_system unless enc
        ret = TkCore::INTERP.__invoke('encoding', 'convertto', enc, str)
        ret.instance_variable_set('@encoding', 'binary')
        ret
      end

[Source]

# File tk/lib/tk.rb, line 2224
      def encoding_names
        tk_split_simplelist(tk_call('encoding', 'names'))
      end

[Source]

# File tk/lib/tk.rb, line 2316
      def encoding_names
        nil
      end

[Source]

# File tk/lib/tk.rb, line 2228
      def encoding_system
        tk_call('encoding', 'system')
      end

[Source]

# File tk/lib/tk.rb, line 2319
      def encoding_system
        nil
      end

[Source]

# File tk/lib/tk.rb, line 2322
      def encoding_system=(enc)
        nil
      end

[Source]

# File tk/lib/tk.rb, line 2232
      def encoding_system=(enc)
        tk_call('encoding', 'system', enc)
      end

[Validate]