Skip to content

remove unprintable chars#747

Merged
osana merged 1 commit into
masterfrom
osana-header-nonascii
Mar 14, 2018
Merged

remove unprintable chars#747
osana merged 1 commit into
masterfrom
osana-header-nonascii

Conversation

@osana

@osana osana commented Mar 13, 2018

Copy link
Copy Markdown
Contributor

closes #720

@osana
osana requested a review from cammace March 13, 2018 12:58
@osana

osana commented Mar 13, 2018

Copy link
Copy Markdown
Contributor Author

@danesfeder it would be great if you could test this on the phone that had this issue

if (TextUtils.isEmpty(osName) || TextUtils.isEmpty(osVersion) || TextUtils.isEmpty(osArch)) {
return Constants.HEADER_USER_AGENT;
} else {
final String onlyPrintableChars = "\\P{Print}";

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a Regex? can we make it a constant?

@cammace

cammace commented Mar 13, 2018

Copy link
Copy Markdown

Any chance we could add a test to ensure the issues been resolved?

@osana
osana force-pushed the osana-header-nonascii branch 9 times, most recently from 9f85d47 to 0af00ec Compare March 14, 2018 00:05
@osana
osana force-pushed the osana-header-nonascii branch from 0af00ec to c865220 Compare March 14, 2018 00:15
@osana

osana commented Mar 14, 2018

Copy link
Copy Markdown
Contributor Author

@cammace changed the test to compare string to make sure non ascii codes are removed.
Found a better pattern for non-ascii chars: [^\\p{ASCII}]

@osana osana added this to the v3.0.0 milestone Mar 14, 2018
@osana
osana merged commit d5d1f06 into master Mar 14, 2018
@osana
osana deleted the osana-header-nonascii branch April 17, 2018 17:05
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.

IllegalArgumentException: Unexpected char when making directions request

3 participants