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

New var name in nc_rename_var() is not normalized for utf8. Should it be? #742

Closed
edhartnett opened this issue Dec 26, 2017 · 8 comments · Fixed by #919
Closed

New var name in nc_rename_var() is not normalized for utf8. Should it be? #742

edhartnett opened this issue Dec 26, 2017 · 8 comments · Fixed by #919

Comments

@edhartnett
Copy link
Contributor

In nc_rename_dim() the new name is run through nc_utf8_normalize().

But this doesn't happen with nc_rename_var().

Shouldn't it?

@DennisHeimbigner
Copy link
Collaborator

DennisHeimbigner commented Dec 26, 2017 via email

@edhartnett
Copy link
Contributor Author

What kind of string can I pass to make sure that normalization is taking place?

That is, what string can I pass that comes out differently after being normalized?

I would like to write some tests before fixing...

@DennisHeimbigner
Copy link
Collaborator

DennisHeimbigner commented Dec 26, 2017 via email

@edhartnett
Copy link
Contributor Author

OK, I will hunt one down and add a test.

@DennisHeimbigner
Copy link
Collaborator

not obvious we need a rename normalization test specifically sine i presume you will use same
name check code used in e.g. nc_def_var

@edhartnett
Copy link
Contributor Author

If we had a rename normalization test then this bug would have been noticed before. So of course we need a test for it.

@DennisHeimbigner
Copy link
Collaborator

I am confused. Did normalization fail or was it just missing?

@edhartnett
Copy link
Contributor Author

Normalization is actually happening as I've just confirmed with a test. I will add the test to my current PR. When it's merged this ticket will be closed.

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 a pull request may close this issue.

2 participants