#23 ✓resolved
Gustavo Carreno

Unable to tweet with special chars

Reported by Gustavo Carreno | February 26th, 2010 @ 05:27 PM | in 0.8

Just noticed this right now while trying to reply to a Brazilian friend of mine.

Using any special chars that are not in the ASCII table will not make the tweet be posted.

Want me to debug this, cuz I use ã é and all this stuff all the time in Portuguese?

Comments and changes to this ticket

  • Matt Curry

    Matt Curry February 26th, 2010 @ 06:34 PM

    • Assigned user changed from “Matt Curry” to “Gustavo Carreno”
    • State changed from “new” to “open”
    • Milestone set to 1.0

    Please. I suck w/ special characters.

  • Gustavo Carreno

    Gustavo Carreno February 27th, 2010 @ 12:10 AM

    Oky, just gimme some time to poke around and I'll get you some more info.

    Hope it's not that bloody "Invalid char in string" thing we had with the Cypher. I still haven't sorted that one out :(

  • Gustavo Carreno

    Gustavo Carreno March 2nd, 2010 @ 01:23 PM

    • Tag set to special chars, unicode
  • Gustavo Carreno

    Gustavo Carreno March 3rd, 2010 @ 09:46 PM

    • Tag changed from special chars, unicode to special chars, unicode, utf8_encode
    • Assigned user changed from “Gustavo Carreno” to “Matt Curry”

    I've removed all call to utf8_encode in the Oauth::__signQuery() like this:

    ==========================================8<==========================================

    function __signQuery($url, $method, $query, $key) {
        $queryTemp = array();
        foreach($query as $k => $v) {
            $queryTemp[] = $k . '=' . rawurlencode(/*utf8_encode(*/$v/*)*/);
        }
    
        $query = implode('&', $queryTemp);
        $base = sprintf('%s&%s&%s', strtoupper($method), rawurlencode(/*utf8_encode(*/$url/*)*/), rawurlencode(/*utf8_encode(*/$query/*)*/));
    
        return base64_encode(hash_hmac('sha1', $base, $key, true));
    }
    

    ==========================================8<==========================================

    and it works now.

    I really don't know if it's due to me using Chrome, but it's working.

    It also looks like you are double encoding $query if it's even possible, I really didn't research utf8_encode appropriately.

    Ok, now back to the studio and Matt Curry... (I always wanted to say this in a real situation!)

  • Gustavo Carreno

    Gustavo Carreno March 3rd, 2010 @ 10:11 PM

    • Milestone changed from 1.0 to 0.8
  • Matt Curry

    Matt Curry March 4th, 2010 @ 01:28 AM

    • State changed from “open” to “resolved”

    Interesting. Adding your changes now. Thanks for taking the time to figure this one out. Anything to do w/ character encoding drives me nuts.

  • Gustavo Carreno

    Gustavo Carreno March 4th, 2010 @ 02:20 AM

    Well, probably because you would have to copy paste some Unicode junk any time you wanted to test. For me it comes with the language :)

    Feel free to toss at me any more Unicode related issues :)

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Pages