Skip to content

Commit

Permalink
fix(from_openstudio): Catch illegal E+ characters are on OSM Import
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey authored and Chris Mackey committed Apr 9, 2024
1 parent 018836c commit e2a9411
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/honeybee/model_object.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ def self.truncate(string, max)

# remove illegal characters in identifier
def self.clean_name(str)
ascii = str.encode(Encoding.find('ASCII'), **@@encoding_options)
ascii = truncate(ascii, 97)
encode_str = str.encode(Encoding.find('ASCII'), **@@encoding_options)
encode_str = truncate(encode_str, 97)
encode_str.gsub(/[,;!]/, '_')
end

# remove illegal characters in identifier
Expand Down

0 comments on commit e2a9411

Please sign in to comment.