Question

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 ... ?

Was it helpful?

Solution

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 €

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top