Search notes:

ADODB: stream.loadFromFile

charCode

Unfortunately, Visual Basic for Application doesn't seem to have any in-built capabilities to read (or write) UTF-8 encoded text (see also here).
However, with the ADODB stream object, a utf-8 encoded file can be read as demonstrated in the following example.
The value of adodb.stream.charSet apparently can be set to any value found in the registry under HKEY_CLASSES_ROOT\MIME\Database\Charset.
In order for this example to compile, the ActiveX Data Objects reference needs to be added.
option explicit

sub main() ' {

    dim s as new adodb.stream
    s.charSet = "utf-8"

    s.open
    s.loadFromFile(environ$("userprofile") & "\utf-8.txt")

    dim txt as string
    txt = s.readText

    s.close

    debug.print(txt)

end sub ' }
Github repository about-adodb, path: /objects/stream/loadFromFile/charCode.bas

See also

The function slurpFileCharSet() in the VBA helper module File.bas
VBA strings: special characters

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759406387, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/ADO/objects/stream/loadFromFile/index(73): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78