Hello,
I think I have an encoding problem on the lines of code below because the value of the “DecimalValue” variable is 65533, whereas it should be 168 for a hex with a value of A8.
Can you help me, or is this a bug?
Thank you.
Sincerely,
<cfset hexChar = "A8" />
<!--- Convertir l'hex en binaire puis obtenir la valeur ASCII --->
<cfset binaryValue = BinaryDecode(hexChar, "hex") />
<cfset decimalValue = Asc(binaryValue) />
<!--- Afficher le résultat --->
<cfoutput>La valeur décimale de #hexChar# est : #decimalValue# - Binary - #BinaryValue#</cfoutput>
OS: Linux (5.4.0-216-generic) 64bit Ubuntu
Java Version: 11.0.7 (AdoptOpenJDK) 64bit
Tomcat Version: Apache Tomcat/9.0.35
Lucee Version: Lucee 6.2.1.122