Module: Tk::Encoding

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

### Methods

encoding encoding encoding= encoding= encoding_convert_from encoding_convert_from encoding_convert_to encoding_convert_to encoding_convertfrom encoding_convertfrom encoding_convertto encoding_convertto encoding_names encoding_names encoding_system encoding_system encoding_system= encoding_system=

### Constants

TkCommandNames | = | ['encoding'.freeze].freeze

### Public Instance methods

encoding()

[Source]

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

encoding()

[Source]

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

encoding=(name)

[Source]

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

encoding=(name)

[Source]

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

encoding_convert_from(str, enc=nil)

Alias for encoding_convertfrom

encoding_convert_from(str, enc=nil)

Alias for encoding_convertfrom

encoding_convert_to(str, enc=nil)

Alias for encoding_convertto

encoding_convert_to(str, enc=nil)

Alias for encoding_convertto

encoding_convertfrom(str, enc=nil)

[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

encoding_convertfrom(str, enc=None)

[Source]

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

encoding_convertto(str, enc=None)

[Source]

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

encoding_convertto(str, enc=nil)

[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

encoding_names()

[Source]

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

encoding_names()

[Source]

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

encoding_system()

[Source]

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

encoding_system()

[Source]

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

encoding_system=(enc)

[Source]

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

encoding_system=(enc)

[Source]

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

[Validate]