view · edit · sidebar · attach · print · history

Changes for ch.oddb.org to run on Ruby 1.9.3

25.10.2011 migrate_to_utf8

Patch (src/util/oddbapp.rb)

Note

  • After the migrate_to_utf8 running, the oddbd runs without error
  • But I feel it runs taking longer than before
  • Dumped database sql file is twice bigger than before

19.10.2011 magic comments

  • added magic comment to every file and then reran the migrate script to re-encode the objects from US-ASCII-8BIT to UTF8.

18.10.2011 migrate_to_utf8

Patch (src/util/oddbapp.rb)

14.10.2011 Arzneimittel A-Z search failure

  • src/model/sequence.rb
    def name
      @name_base.force_encoding('utf-8') if @name_base
      @name_descr.force_encoding('utf-8') if @name_descr
      [@name_base, @name_descr].compact.join(', ')
    end

    def composition_text
      @composition_text || @packages.collect { |cd, pac|
        (src = pac.swissmedic_source) && src[:composition]
      }.compact.first
      @composition_text.force_encoding('utf-8') if @composition_text
    end
  • ruby193rc1/lib/ruby/gems/1.9.1/gems/sbsm-1.0.0/lib/sbsm/lookandfeel.rb
    def _lookup(key, *args)
      key = key.intern if key.is_a? String
      if(args.size > 0)
        result = ""
        args.each_with_index { |text, index|
          result << (lookup(key.to_s + index.to_s) || ' ')
          #result << text.to_s
          result << text.to_s.force_encoding('utf-8')
view · edit · sidebar · attach · print · history
Page last modified on October 28, 2011, at 02:11 PM