Getting character code from emoji
Posted: Mon Mar 31, 2025 8:34 pm
Elephant emoji is character 128024. (I found this by googling for it.)
How can I find this number using PureBasic?
In other words I'm looking for the reverse function of STARGÅTE's UnicodeChr procedure.
I asked ChatGPT but it seems it can't get the correct result!
How can I find this number using PureBasic?
In other words I'm looking for the reverse function of STARGÅTE's UnicodeChr procedure.
I asked ChatGPT but it seems it can't get the correct result!
Code: Select all
Procedure.s UnicodeChr(Number.i) ; procedure by STARGÅTE
Protected Buffer.l
If Number <= $FFFF
ProcedureReturn Chr(Number)
Else
Buffer = (Number&$3FF)<<16 | (Number-$10000)>>10 | $DC00D800
ProcedureReturn PeekS(@Buffer, 2, #PB_Unicode)
EndIf
EndProcedure
Debug "🐘"
Debug UnicodeChr(128024)