Re: Standardizing file open etc

2012-01-23 Thread Michael Cronenworth

Mixbus JohnE wrote:

Our 'C' program uses 'open()' and the like for dealing with disk files.  This 
seems to work okay on Linux but not so well on Windows if there are (say) Greek 
or Russian characters in the file path.  I'm not a Linux programmer so I assume 
that 'open()' on Linux must be UTF-8 aware maybe??


g_filename_from_utf8()



On Windows I'd need to use '_wopen()' in this context but that would mean 
having different code for Windows and Linux.  Is there anything built into Glib 
that could help with this?  e.g. a function which can take a UTF-8 encoded file 
path and open the file successfully, whether on Windows or Linux?  Thanks.


g_open()

Read the documentation pages surrounding the two functions I suggested 
to understand how they work on Windows.

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


Standardizing file open etc

2012-01-23 Thread Mixbus JohnE
Our 'C' program uses 'open()' and the like for dealing with disk files.  This 
seems to work okay on Linux but not so well on Windows if there are (say) Greek 
or Russian characters in the file path.  I'm not a Linux programmer so I assume 
that 'open()' on Linux must be UTF-8 aware maybe??

On Windows I'd need to use '_wopen()' in this context but that would mean 
having different code for Windows and Linux.  Is there anything built into Glib 
that could help with this?  e.g. a function which can take a UTF-8 encoded file 
path and open the file successfully, whether on Windows or Linux?  Thanks.

John
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list