Re: MySQL ASCII codes
Hi Cándido,
The ord() function in MySQL behaves differently regarding your charset (see
https://dev.mysql.com/doc/refman/8.0/en/string-functions.html#function_ord).
But if you want to achieve what you are trying to do, here is one method:
mysql> SELECT ord(CAST('à' AS CHAR CHARACTER SET latin1));
+----------------------------------------------+
| ord(CAST('à' AS CHAR CHARACTER SET latin1)) |
+----------------------------------------------+
| 224 |
+----------------------------------------------+
1 row in set (0.00 sec)
Best regards and thank you for using MySQL!
lefred.
Subject
Written By
Posted
Re: MySQL ASCII codes
January 09, 2019 02:08AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.