What is the correct way to encode status on status update post?


#1

I was wondering what is the correct way to encode tweets before sending them to twitter? I am using PHP and I’ve tried multiple ways…
Here they are :

  1. just utf8_encode
  2. just urlencode
  3. just rawurlencode
  4. utf8_encode + rawurlencode
  5. utf8_encode + urlencode

And when I try to post " ’ " I always end up with something like this " ’ "