Conversation
maucejo
left a comment
There was a problem hiding this comment.
I prefer to not modify the line file_extension = , since with splittext we need to add ".unv" instead of "unv" in the function supported_file_extension.
|
Makes sense.
Jake
From: Mathieu Aucejo ***@***.***>
Sent: November 26, 2025 3:50 AM
To: maucejo/UFFFiles.jl ***@***.***>
Cc: JakeZw ***@***.***>; Author ***@***.***>
Subject: Re: [maucejo/UFFFiles.jl] Minor bug fixes and enhancements (PR #13)
@maucejo commented on this pull request.
I prefer to not modify the line file_extension = , since with splittext we need to add ".unv" instead of "unv" in the function supported_file_extension.
—
Reply to this email directly, view it on GitHub <#13 (review)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ADF3P7FK6TZZ6DLEUYA5ZU336VSTXAVCNFSM6AAAAACNGXNQQKVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZTKMBZG43DINBYGU> .
You are receiving this because you authored the thread. <https://github.com/notifications/beacon/ADF3P7FP2VN4ZQDTBPXNWZL36VSTXA5CNFSM6AAAAACNGXNQQKWGG33NNVSW45C7OR4XAZNRKB2WY3CSMVYXKZLTORJGK5TJMV32UY3PNVWWK3TUL5UWJTWRGLAYK.gif> Message ID: ***@***.*** ***@***.***> >
|
|
As I am curious as to what others do with right padding the header lines in universal files. A little survey on what I have available: NX I-deas 5 unv - does not right pad This sampling is sufficient to note that the header lines do not need to be right padded but sometimes are and that applications are inconsistent in this area. So in reading files we need to be aware of this. To handle this inconsistency, UFFFiles in some areas uses a while loop of the following format: The [1:6] extracts the first 6 characters of the string. This loop needs to be after any header lines that are potentially shorter than 6 characters such as "NONE". This is the case so all should be well. |
|
I think that the safer code would be That being said, I think that standards must be respected (e.g. a line is 80 characters and not 93!). With this diversity and relaxed approach of the standard, I am afraid that we can't manage all the slight variations introduced by some software editors. But I may be wrong... |
I noted that uff.m writes all lines including the “ -1” line out to 80 characters. Thus I previously modified the read_write_uff.jl file for this.
However I did not modify the lines similar to this: while (r1 = readline(io)) != " -1"
which may be a bug. This has been corrected to while (r1 = readline(io))[1:6] != " -1"
This should leave r1 unaffected and will only compare the first 6 characters with “ -1”
Better Julian error handling for dataset58b.jl
Minor cosmetic change of split to splitext in read_write_uff.jl