Measure with Chinese characters give utf-8 error
Initial Condition: Gathering data from EnergyPlus SQL file and OSM model. Will report in SI Units
Error: incompatible character encodings: UTF-8 and ASCII-8BIT
(erb):218:in block (4 levels) in run'
(erb):211:in
each'
(erb):211:in each_with_index'
(erb):211:in
block (3 levels) in run'
(erb):209:in each'
(erb):209:in
each_with_index'
(erb):209:in block (2 levels) in run'
(erb):174:in
each'
(erb):174:in block in run'
(erb):161:in
each'
(erb):161:in run'
:/ruby/2.5.0/erb.rb:876:in
eval'
:/ruby/2.5.0/erb.rb:876:in result'
C:/Users/AWE/AppData/Local/Temp/osmodel-1605838008-1/resources/measures/Midea-Ideal/measure.rb:352:in
run'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:514:in apply_measure'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:109:in
block in apply_measures'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in each_index'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/util/measure.rb:67:in
apply_measures'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/jobs/run_reporting_measures.rb:105:in perform'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:292:in
step'
:/ruby/2.5.0/gems/openstudio-workflow-2.0.0/lib/openstudio/workflow/run.rb:234:in run'
:/openstudio_cli.rb:960:in
execute'
:/openstudio_cli.rb:750:in execute'
:/openstudio_cli.rb:1744:in
<main>'
eval:174:in eval'
eval:174:in
require_embedded_absolute'
eval:160:in block in require_embedded'
eval:154:in
each'
eval:154:in require_embedded'
eval:113:in
require'
eval:3:in `<main>'
Measure file :
def self.general_building_information_table(model, sqlFile, runner, is_ip_units = true) # general building information type data output general_building_information = {} general_building_information[:title] = '建筑综合信息' # name will be with section 建筑综合信息 Building Summary general_building_information[:header] = ['Data', 'Value'] general_building_information[:units] = [] # won't populate for this table since each row has different units general_building_information[:data] = []