Git Product home page Git Product logo

Comments (6)

joshk avatar joshk commented on July 28, 2024

Hey Flowfeeler,

Are you able to provide a failing test case so I can look into this further?

Thanks,

Josh

from linkedin.

renatosnrg avatar renatosnrg commented on July 28, 2024

I'm having the same problem with some accentuated characters. For example, the search for "André" gives the following issue:

result = linkedin.search(:keywords => 'André', :count => 1)

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/uri/generic.rb:512:in check_query': bad component(expected query component): count=1&keywords=André (URI::InvalidComponentError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/uri/generic.rb:526:inquery='
from /Library/Ruby/Gems/1.8/gems/linkedin-0.1.7/lib/linked_in/client.rb:190:in to_uri' from /Library/Ruby/Gems/1.8/gems/linkedin-0.1.7/lib/linked_in/client.rb:103:insearch'
from linkedin_test.rb:10

from linkedin.

renatosnrg avatar renatosnrg commented on July 28, 2024

CGI.escape seems to solve this issue:

result = linkedin.search(:keywords => CGI.escape('André'), :count => 1)

I think a good solution would be add this escaping automatically in the gem instead of in the parameters. What do you think?

Regards,
Renato

from linkedin.

joshk avatar joshk commented on July 28, 2024

Hi Renatosnrg,

I have just pushed a fix to master which uses URI.escape which fixes the utf8 issues you were having.

If there is a good reason to change to CGI vs URI, please let me know and I will look into it.

I hope to release a new patch version soon, until then please feel free to use the git repo in your Gemfile.

Thanks,

Josh

from linkedin.

renatosnrg avatar renatosnrg commented on July 28, 2024

Thanks a lot!

Renato

from linkedin.

dacaga avatar dacaga commented on July 28, 2024

Sorry about that, I have been out traveling for a while, I had monkey patched that on my side but forgot about it. I'm glad it has been fixed :)

from linkedin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.