문제

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