Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • urlencoding() usage

    Hi all,

    Anyone understand the usage of urlencoding()?
    string scalar urlencode(string scalar s , real scalar useplus )
    string scalar urldecode(string scalar s)
    Never managed to use this command..

  • #2
    https://en.wikipedia.org/wiki/URL_encoding

    Comment


    • #3
      Originally posted by Andrew Musau View Post
      Thanks Andrew! I understand what url encoding is but am confused about string scalar in stata.

      For example, if I execute
      di urlencoding(" α α α α α")
      it always reports error.

      Comment


      • #4
        It's a Mata function:

        Code:
        mata: urlencode("北京", 1)
        Res.:

        Code:
        . mata: urlencode("北京", 1)
          %E5%8C%97%E4%BA%AC

        Comment

        Working...
        X