get the utf8 in VBA
Find a file
2022-04-22 18:38:32 +02:00
LICENSE Init 2022-04-22 18:38:32 +02:00
README.md Init 2022-04-22 18:38:32 +02:00
umlautUtf8ToInt.bas Init 2022-04-22 18:38:32 +02:00
write_vba_cases.py Init 2022-04-22 18:38:32 +02:00

umlautUtf8ToInt

Idea

I got the problem to get the utf8 in VBA. After hours of researching, I resigned and wrote a table.

Licence

If it helps you, you can use it with a GLP licence or ask me for an other licence.

How to

The function umlautUtf8ToInt(c) takes one character and returns an integer.

If it is a character we defined here, it gives us the uft8 as integer, else there is a msgbox and returns 0

Use hex(i) to get the hexadecimal code from the uft8.

More characters

I wrote a python script, that gives you the ability to enlarge the swich cases very fast. You just need to edit the list of characters and run it. Use the output to adapt the Basic script.