[M3devel] Windows, Unicode file names

Dragiša Durić dragisha at m3w.org
Mon Jun 25 20:49:22 CEST 2012


My situation was - Gtk2 interface (GtkFileChooser in my case) returns an UTF-8 encoded string. UTF-8 being GLib internal/native encoding. Neither CreateFileA not CreateFileW can handle it so I "hardcoded" some logic into FS.OpenFile(Readonly)? and handled a case with non-ASCII input. Ideal would be to have encoding information as an integral part of every TEXT, but… In my knowledge, POSIX systems handle UTF-8 filenames well (?check:) so explicit information on encoding for FS is needed only for Windows.

On Jun 25, 2012, at 8:44 PM, Jay K wrote:

> Functions like CreateFileA use the "ANSI" or "OEM" code page, subject to a public global in Win32, and the two code pages vary per-install (or per-user). It is just not a good system.
>  
>  
> Functions like CreateFileW work very well with 16bit encoded characters.
> 
>  
> Can/do we arrange to have 16bit encoded characters?
>  
>  
>  - Jay
> 
> > From: dragisha at m3w.org
> > Date: Mon, 25 Jun 2012 12:51:05 +0200
> > To: m3devel at elegosoft.com
> > Subject: [M3devel] Windows, Unicode file names
> > 
> > Anybody aware of issues with FSWin32.m3 and cases where one actually has to cover situation with non-ASCII filenames under Windows? Met problem?
> > 
> > TIA,
> > dd
> >

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20120625/a102caa5/attachment-0002.html>


More information about the M3devel mailing list