Results 1 to 1 of 1

Thread: Does anybody know if it's possible to get http.request to read UTF-8?

  1. #1
    Join Date
    Jul 2001
    Location
    Risr - Norway
    Posts
    5,477

    Default Does anybody know if it's possible to get http.request to read UTF-8?

    If I do http.request on a page (any page, no matter if it's pure HTML or Javascript) that has the Norwegian special characters, like , or accented characters, like , it will answer with ø and similar. I can of course use string.gsub to replace them, but it would be nice if I didn't have to. So is there a way to get this working right?

    An example:

    print(http.request('http://www.urbandictionary.com/define.php?term=%C3%86%20%C3%98%20%C3%85'))
    This will give you a full page, but somewhere down there you'll find this:

    <meta content='† ˜ …' name='twitter:title'>
    Thils should have been
    Last edited by Mastiff; January 23rd, 2017 at 06:25 AM.
    Tor - managing director of the Cinema Inferno home theater and multi-zone sound system with Girder running the show in the back, NetRemote as the GUI and Media Center 17, PowerDVD and ZoomPlayer as playback software
    Hobsyssel mastiffs: http://www.hobsyssel.no

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •