开发者

Twitter URL encoding. Getting error when placing UK Currency sign in URL?

I'm attempting to setup a retweet button with some pre-written post text. However开发者_运维知识库 I need to place a pound sign in like so:

£50k

I've search the web and for the UK currency sign I've been told it is supposed to be replaced with the code: %a3

However when I attempt to click on the link I get the error message:

"Invalid Unicode value in one or more parameters"

This is the document declaration at the top of the html page I'm using:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


Try escaping it as &pound; usually this is how you would do it when using HTML. You can also do it using &#163;


Would add to the above answer that sometimes you might need to use %C2%A3to get it to work. Where %A3 is a £ and the preceding character prevents it from being mis-read by some scripts.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜