Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Some quotation symbols stripped from comment lines #373

Open
MitchHeineman opened this issue Feb 6, 2020 · 3 comments
Open

Some quotation symbols stripped from comment lines #373

MitchHeineman opened this issue Feb 6, 2020 · 3 comments

Comments

@MitchHeineman
Copy link

MitchHeineman commented Feb 6, 2020

Some types of single (e.g. can’t find problem) and double (e.g. 64” opening) quotation marks are altered in Description lines upon export to .inp. E.g.

;Sediment from 2019 inspection; Updated to reflect 64” opening on 72" pipe
becomes
;Sediment from 2019 inspection; Updated to reflect 64� opening on 72" pipe

;Can’t find elevations should be on 74-24
becomes
;Can�t find elevations should be on 74-24

extremely small (1-3”)
becomes
extremely small (1-3”)

The problem seems to be that there are two kinds of quote symbols.

(I've removed what I thought was the same issue relating to problems reading [Inflows]. Will post new issue

@barrc
Copy link
Contributor

barrc commented Feb 18, 2020

I copied the three original description lines and placed them above objects in an old input file and opened that file with the Delphi GUI. The Delphi GUI also doesn't seem to recognize those symbols on my machine:

image

image

image

@MitchHeineman
Copy link
Author

MitchHeineman commented Feb 19, 2020

I've attached an input file consisting of three junctions and associated comment lines. The Delphi GUI resaves it faithfully along with expected additional sections. In the Python GUI I observe the following:

  1. As originally noted, some quote symbols are stripped
  2. The first comment line is not associated with the junction in the GUI, although it is written into the resaved input file
  3. The [Junctions] sections in the resaved input file is placed before the [Title] section. This is not a problem for the computational engine, but is inelegant.
  4. All keywords in sections such as [Options] have a leading space (e.g. LINK_OFFSETS). This is not a problem, but is unnecessary
  5. All lines in sections such as [Options] are padded with spaces to column 20 after the keyword and then have a tab character before the value. This is not a problem, but differs from the Delphi GUI's behavior.

Conceivably items 2 and 3 are new issues, but I'm using the Jan 21 build, so perhaps these have been addressed. If not let me know and I can create additional issues.

QuoteSymbolExample.zip

@PaulDudaRESPEC PaulDudaRESPEC self-assigned this May 19, 2020
PaulDudaRESPEC added a commit that referenced this issue May 20, 2020
…omment handling, strip out non-ascii characters in inp file, addresses some of issue #373
@PaulDudaRESPEC
Copy link
Collaborator

Enhanced the code to make it more robust when it hits non-ascii characters and better save comments. The remaining issues mentioned here are stylistic, not bugs, in fact official swmm examples (for example Example1.inp) use this style.

@PaulDudaRESPEC PaulDudaRESPEC removed their assignment May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants