Skip to content

Strip BOM before processing records#23

Merged
shapiromatron merged 1 commit intoMrTango:masterfrom
holub008:master
Apr 23, 2020
Merged

Strip BOM before processing records#23
shapiromatron merged 1 commit intoMrTango:masterfrom
holub008:master

Conversation

@holub008
Copy link
Copy Markdown
Contributor

Resolves #13

Functional Changes

This change strips a BOM character, if present, from both the load (file based) and loads (string based) entry points to the RIS parser.

Testing

I added a new test case. I verified the test file includes a BOM character via:

hexdump -n 15 -C tests/data/example_bom.ris 
    00000000  ef bb bf 54 59 20 20 2d  20 4a 4f 55 52 0a 44     |...TY  - JOUR.D|
    0000000f

Ran tests via make test (12/12 passed, whereas 11/12 passed before changes) and checked formatting via make lint.

@shapiromatron shapiromatron merged commit 2848cc7 into MrTango:master Apr 23, 2020
@shapiromatron
Copy link
Copy Markdown
Collaborator

thanks @holub008! I'll wait on minting a new version unless you need it

@holub008
Copy link
Copy Markdown
Contributor Author

@shapiromatron Not a problem to wait - it's easy enough to implement the change in a forwards compatible way outside loads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BOM encoding issue

2 participants