[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] 92c1b2: Handle both an ASCII (UTF8) and a WIDE (UTF16) ver...
Alistair Grant
akgrant0710 at gmail.com
Sun Dec 30 08:57:17 UTC 2018
Hi Nicolas,
On Sat, 29 Dec 2018 at 22:58, GitHub <noreply at github.com> wrote:
>
> Log Message:
> -----------
> Handle both an ASCII (UTF8) and a WIDE (UTF16) version of image/vm name/path
This is the same issue I've dealt with recently in FileAttributesPlugin.
What I did there was to create a structure that holds both the VM
(UTF-8) encoded version and the platform specific encoded version
(WCHAR for Windows) and use accessor routines that make sure the two
are kept in sync:
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/plugins/FileAttributesPlugin/faSupport.h
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/unix/plugins/FileAttributesPlugin/faSupport.c
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/win32/plugins/FileAttributesPlugin/faSupport.h
https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/platforms/win32/plugins/FileAttributesPlugin/faSupport.c
I doubt that this code is generally useful because of the way it
allows for a directory to be set and then a file name to be added to
the path, but the concept may be useful.
Cheers,
Alistair
More information about the Vm-dev
mailing list