This works in php cli (on the command line),

php >  echo bin2hex(iconv("utf-8","iso-8859-1","\xc3\xa9"));
e9

That is, because I know the name of the unicode encoding of u20ac: latin-1, which is a part of iso-8859-1.

I want to do the same for the euro sign,

php > echo bin2hex(iconv("utf-8","...","\xe2\x82\xac"));
20ac

What is the name of the encoding of the euro sign, which should be filled in on the ... ?

有帮助吗?

解决方案

you should convert to UTF-16. Did I win? :-)

Seriously now, that would give you fffeac20. Close enough, but not exactly.

However, I suspect you're looking for the html entity for the Euro sign, which would be either € or €

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top