Parent

Methods

Files

Class Index [+]

Quicksearch

XSD::IconvCharset

Public Class Methods

safe_iconv(to, from, str) click to toggle source
    # File lib/xsd/iconvcharset.rb, line 16
16:   def self.safe_iconv(to, from, str)
17:     iconv = Iconv.new(to, from)
18:     out = ""
19:     begin
20:       out << iconv.iconv(str)
21:     rescue Iconv::IllegalSequence => e
22:       out << e.success
23:       ch, str = e.failed.split(//, 2)
24:       out << '?'
25:       warn("Failed to convert #{ch}")
26:       retry
27:     end
28:     return out
29:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.