[M3devel] Windows, Unicode file names

Rodney M. Bates rodney_bates at lcwb.coop
Mon Jun 25 22:29:06 CEST 2012



On 06/25/2012 02:48 PM, Dragiša Durić wrote:
> It can be what cm3 people had in mind when they created WIDECHAR as a catchall for Unicode.
>
> At first glance it looked like no solution to me, but after counting to ten - I think it is. We can have an UTF-8 layer and use it when and where needed, to recode our strings to catchall WIDECHAR/WIDETEXT.
>
> As long as we agree on what exacty WIDECHAR is :)
> ===From wikipedia
> The Microsoft Windows application programming interfaces <http://en.wikipedia.org/wiki/Application_programming_interface> Win32 <http://en.wikipedia.org/wiki/Win32> and Win64 <http://en.wikipedia.org/wiki/Win64>, as well as the Java <http://en.wikipedia.org/wiki/Java_%28software_platform%29> and .Net Framework <http://en.wikipedia.org/wiki/.Net_Framework> platforms, require that wide character variables be defined as 16-bit values, and that characters be encoded using UTF-16 <http://en.wikipedia.org/wiki/UTF-16> (due to former use of UCS-2), while modern Unix <http://en.wikipedia.org/wiki/Unix>-like systems generally require 32-bit values encoded using UTF-32 <http://en.wikipedia.org/wiki/UTF-32>^[/citation needed <http://en.wikipedia.org/wiki/Wikipedia:Citation_needed>/] .
> ===
>

This is not necessarily a proposal, but  FWIW:

hen working on my altered cm3 TEXT implementations, I put every relevant thing I could find into
a state that should allow M3 WIDECHAR to be 32-bit, with only one or two declarations
changed.  I think Pickles might need some attention to cope with this, however.  We would
want them to not only handle 32-bit WIDECHAR, but be able to read older pickle files that
used 16-bits.

>
> On Jun 25, 2012, at 9:39 PM, Jay K wrote:
>
>> I think I know what to do here and will look into it..later..
>>
>> We have TEXT. We should just always get WIDECHARs out of it and call CreateFileW.
>> Assuming UTF8 is the wrong solution at this level, and passing in UTF8 won't work with the correct solution.
>> A layer above this needs to decode UTF8, if that is the encoding.
>>
>> Unless someone has declared and implemented that TEXT is in fact always UTF8-encoded, which I doubt.
>>
>> - Jay
>



More information about the M3devel mailing list