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

Invalid characters for names and given names #6188

Open
RealityMistic opened this issue Mar 25, 2021 · 2 comments
Open

Invalid characters for names and given names #6188

RealityMistic opened this issue Mar 25, 2021 · 2 comments

Comments

@RealityMistic
Copy link

Good day!

We are the ministry of Science of Spain and we have an issue while integrating one of our applications with the ORCID Public API. Apparently, in our data, one of the researchers used parenthesis (Nickname) to indicate a nickname and while crossing the data with the ORCID API we got a HTTP 500 Server error.

We really don't want that to happen again, so we are filtering our data to remove parentheses, but we would like to include ALL INVALID CHARACTERS to filter in our function. Can someone provide such a list?

Thanks a lot for the wonderful job at ORCID!

@iamanshulgit
Copy link

iamanshulgit commented Aug 4, 2021

Good day!

We are the ministry of Science of Spain and we have an issue while integrating one of our applications with the ORCID Public API. Apparently, in our data, one of the researchers used parenthesis (Nickname) to indicate a nickname and while crossing the data with the ORCID API we got a HTTP 500 Server error.

We really don't want that to happen again, so we are filtering our data to remove parentheses, but we would like to include ALL INVALID CHARACTERS to filter in our function. Can someone provide such a list?

Thanks a lot for the wonderful job at ORCID!

Hello @drachodan,
I am glad that I am here to give my sample code for all special characters. Below I am going to leave a code to generate the list of all special characters. Please consider the code and I hope it may help you. If you feel you can clone the whole ### package from my Github account under the name "specialCharacter".
#############################################################################################
Solution:
//solution: List all the special characters from the ASCII value to a string value.
int min = 0, max =128; //ASCII value ranges from 0-127
List sol = new ArrayList();
for(int i = min; i < max ; i++) {
char value = (char)i; //storing ASCII value to char
sol.add(Character.toString(value).replaceAll("[a-zA-Z0-9]", "")); //storing into the list of string using regex which remove alphanumeric character.
System.out.print(value); //checking out the all ASCII values
}
System.out.println();
for(String temp : sol)
System.out.print(temp); //checking out the list of all special characters.
#############################################################################################

@TomDemeranville
Copy link
Contributor

Hi could you provide the affected ORCID ID so we can investigate? Apologies for the late response!

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

No branches or pull requests

3 participants