Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Change climatic data summary string searches to avoid potential encoding differences #7102

Closed
3 tasks
mjwitte opened this issue Dec 12, 2018 · 2 comments · Fixed by #7829
Closed
3 tasks
Labels
PriorityHigh This defect or feature has been declared high priority

Comments

@mjwitte
Copy link
Contributor

mjwitte commented Dec 12, 2018

Issue overview

As noted here in #6192 the string searches for some of the Climatic Data Summary fields have embedded special characters which fail to match if the weather stat file does not have the same encoding as EnergyPlus (which is now UTF-8). Note the bad encoding of the degree symbol for latitude and longitude. Also all the lines related to Köppen classification and ASHRAE Handbook CDD/HDD are missing with the Western (Windows 1252) encoded stats file.

It can't find the Köppen classification because it is searching the Western (Windows 1252) line using an UTF-8 encoded string. We'd need to either re-write the specific parts to be encoding agnostic, read the file stats file as UTF-8, or convert the encoding of that specific input string to UTF-8.

Possible approach (MJW):Would it work to search just parts of the string, leaving out the offending characters, and then output the full utf-8 string, not what's in the stat file? In fact, I'd prefer to see the line show up in the table with a blank value even if the data isn't found in the stat file.

Details

Some additional details for this issue (if relevant):

Checklist

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Defect file added (list location of defect file here)
  • Ticket added to Pivotal for defect (development team task)
  • Pull request created (the pull request will have additional tasks related to reviewing changes that fix this defect)
@mjwitte mjwitte added the PriorityHigh This defect or feature has been declared high priority label Dec 12, 2018
@NREL NREL deleted a comment from lklawrie Dec 13, 2018
@EnergyArchmage
Copy link
Contributor

I ran into this issue, which causes 7 fields to be missing in the Weather Statistics File summary table output.

As discussed during a subgroup call on 7/31/2019, I experimented with truncating the search strings to avoid the special characters and it worked well. The changes have been published in

https://github.com/NREL/EnergyPlus/tree/7102-weather-stat-file-search-strings

@mjwitte
Copy link
Contributor Author

mjwitte commented Jul 31, 2019

Nice that it works.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
PriorityHigh This defect or feature has been declared high priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants