Results 1 to 2 of 2

Thread: encodeURIComponent and strfind problem

  1. #1
    Join Date
    Sep 2004
    Posts
    7

    Default encodeURIComponent and strfind problem

    Hy there,

    well, don't ask why but I got a text like that:

    Code:
    http://kaneda:81/index.html?C:%5CDOKUME~1%5CTETSUO~1%5CEIGENE~2%5CALTERN~1%5C01-11-~1.MP3
    and then I got a LUA-Code like:

    Code:
    if strfind(pld1,"%5C") then
     temp = gsub (tostring(pld1) ,"%5C","\\")
     execute(start".." ".."C:\\Programme\\Winamp\\winamp.exe".." "..temp)
    else
     result = 0
    end
    If I replace the %5C (I think you get it that this is the URI placeholder for a slash) with e.g. "xHHHx" it works.
    It's important that it's %5C. How can I handle the percent-sign in a strfind?

    Greets
    Tetsuo

  2. #2
    Join Date
    Dec 2001
    Posts
    11,560

    Default

    Tetsuo, the % is a special character in lua strings. I think %% = % but you will have to check the lua docs in the top post in this forum.

Posting Permissions

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