Re: Strange Error with Glib::ustring
- From: Krzysztof Kosiński <tweenk pl gmail com>
- To: Gtk MailingList <gtkmailinglistgreesce googlemail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Strange Error with Glib::ustring
- Date: Sun, 19 Dec 2010 20:38:54 +0100
2010/12/19 Gtk MailingList <gtkmailinglistgreesce googlemail com>:
> In this little program i try to replace all spaces in the string with "\ ".
> Because if you use a space character in a path on the command line it
> doesn't work. You must always use "/home/user/some\ directory/second\
> directory" instead of "/home/user/some directory/second directory". Maybe
> you have an better idea to solve this problem.
Use g_spawn_sync() / g_spawn_async() instead of system() to execute
the command line program. The g_spawn family of functions takes a list
of program arguments instead of a command line, so you don't need to
escape any special characters.
Regards, Krzysztof
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]