< Niklaus.20200603-ruby-271 | Index | Niklaus.20180228-gtin >>
I have problems making calls from the oddb.org app to the currency.
Also upgrading the pg gem to 1.0.0 needs converting PGresult --> PG::Result in src/util/persistence.rb
Corrected various spec tests. Still having some errors
Therefore postponing it for the moment.
2] pry(#<HtmlGrid::Value>)> puts error invalid byte sequence in US-ASCII => nil [3] pry(#<HtmlGrid::Value>)> value => "iQone Healthcare switzerland S\xC3\xA0rl"
Folgende bin/admin zeigt all 108 Probleme patinfos.values.find_all do |x| if x.company_name && x.company_name.match(/xüx/); false; end; rescue => error; cleaned = x.company_name.encode('utf-8', :invalid => :replace, :undef => :replace, :replace => '?'); puts "error #{error} in #{x.pointer} cleaned: <#{cleaned}"; true; end.size
Aber wir können hier den company_name nicht korrigieren. Fand folgende UTF-8 Fehler in Company.name
companies.values.find_all do |x| if x.name && x.name.match(/xüx/); false; end; rescue => error; cleaned = x.name.encode('utf-8', :invalid => :replace, :undef => :replace, :replace => '?'); puts "error #{error} in ptr #{x.pointer} id #{x.odba_id} cleaned: <#{cleaned}";true; end.size
Versuch zu Updaten zeigt Fehler, dass das Feld name in company manchmal ein Hash. Umgang wie folgt:
companies.values.find_all do |x| if x.name && x.name.match(/xüx/); false; end; rescue => error; puts x.name; cleaned = x.name.encode('utf-8', :invalid => :replace, :undef => :replace, :replace => '?'); puts "error #{error} in ptr #{x.pointer} id #{x.odba_id} cleaned: <#{cleaned}"; x.name = clean; odba_store; rescue; true; end.size
Jetzt kann /de/gcc/show/reg/65373/seq/01/pack/001 ohne Probleme angezeigt werden, aber der Registartionsinhabe bleibt leer. Erstelle alle Indices neu und mache am nächsten Montag weiter.
Weitere Erkenntnisse sind:
doctor.pointer = ODDB::Persistence::Pointer.new([:doctor, doctor.oid])
Um dies nachzuholen, kann folgender bin/admin
Befehl verwendet werden: companies.values.find_all { |x| !x.pointer}.each{ |company| company.pointer = ODDB::Persistence::Pointer.new([:company, company.oid]); company.odba_store}
begin terms = @name.split(/[\s\-()]+/u).select { |str| str.size >= 3 } rescue => error # corrected = @name.encode('utf-8', :invalid => :replace, :undef => :replace, :replace => '?') corrected = @name.force_encoding(Encoding::UTF_8) $stdout.puts "search_terms: #{error} #{pointer} in #{@name} storing correctd #{corrected}" @name = corrected self.odba_store; terms = @name.split(/[\s\-()]+/u).select { |str| str.size >= 3 } end <...>
Danach würde folgender Aufruf in bin/admin
das Problem lösen: companies.values.each{ |x| x.search_terms}