Skip to content

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