Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

中文字符,应该是 utf8 编码的字符,进行 urlencode,得到的是乱码,而非 lua5.4 环境中的正确结果 #19

Closed
TheBadZhang opened this issue Aug 7, 2020 · 0 comments

Comments

@TheBadZhang
Copy link
Collaborator

string.urlEncode = function (srcURL)
	str = srcURL:gsub ("([^%w%-%. ])", function (c)
		return string.format ("%%%02X", string.byte (c))
	end):gsub(" ", "+")
	-- print ("str", str)
	return str
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants