string - Problem with php bin2hex function -
i using php function bin2hex on strings, , 1 of them have division sign character ÷ (dec: 247, hex: f7).
but when try:
echo bin2hex('÷');
i get:
c3b7
the first problem c3 character added , have no idea comes (c2 gets added before other characters).
and second , main problem, php giving me hex string "b7" representation of division sign ÷, b7 represents · , not ÷.
anyone knows whats going on here?
it seems source code unicode-encoded editor encodes '÷' in unicode (eg. utf-8). "c3b7" two-byte encoded form of '÷' (see here). make sure source code ascii-encoded effect desire.
Comments
Post a Comment