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

UTF normalization middleware #57

Closed
wants to merge 1 commit into from
Closed

UTF normalization middleware #57

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 2, 2013

@sferik
Copy link
Member

sferik commented Mar 2, 2013

Looks good to me. Arguably, we should be normalizing in Faraday itself.

@mislav
Copy link
Contributor

mislav commented Mar 3, 2013

It could use some documentation, at least on the class level. For instance, it could say what it actually does, because I don't know what "unicode normalization" is or when do I need it

@ghost
Copy link
Author

ghost commented Mar 3, 2013

The first links in Google gives a complete understanding of the subject

http://www.unicode.org/faq/normalization.html
http://unicode.org/reports/tr15/

@mislav
Copy link
Contributor

mislav commented Mar 3, 2013

So, when is normalization needed?

It doesn't seem to me like the answer is "all the time". If I'm not comparing strings, I guess I don't care if they are normalized or not?

@ghost
Copy link
Author

ghost commented Mar 3, 2013

Not normalized utf can bring many surprises when regexp matching, or if the unnormalized faraday response store in the database, then the selections can be incorrect result (the same person's name can be composed of different characters UTF), all of them can be reduced to a "string comparison", but this is not quite correct.
I needed this functionality to remove "junk" characters from the text.
Hardly need all this functionality, but it's pretty useful.

@ghost ghost mentioned this pull request Mar 5, 2013
@ghost
Copy link
Author

ghost commented May 9, 2014

extracted this functional in a separate gem faraday_utf

@ghost ghost closed this May 9, 2014
@ghost ghost deleted the normalize_utf branch May 9, 2014 20:53
This pull request was 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 this pull request may close these issues.

2 participants