Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Make StringVal stop at first NULL #36

Open
wants to merge 1 commit into
base: go1
Choose a base branch
from
Open

Conversation

op
Copy link
Contributor

@op op commented Jun 22, 2015

I'm a bit unsure what the best solution for ASCII fields are but this feels like a sane approach for most fields. Previously StringVal() would return the raw value of the tag without any stripping of \x00.

For special fields like eg. Copyright, this doesn't work perfectly and a user would need to access the .Val. Though, I think the API makes more sense now since it will return the string value.

For the MakerNote test case change, it seems like that particular image is encoded with MakerNote as ASCII compared to all the others which are encoded as Undefined which is the expected.

@op op mentioned this pull request Jun 22, 2015
Previously StringVal would return the raw value of the tag without any
stripping of NULL. For special fields like Copyright etc, the value can
still be accessed through Val.
@xor-gate
Copy link

xor-gate commented Jan 8, 2017

@op It seems the author is not very active in this project anymore, many forks have been created. I would like to make this stable and I created goexif2 which integrates your patch: xor-gate@34c409c

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.

2 participants