Skip to content

Commit

Permalink
Fix #19 Can't open project (with non-ASCII path)
Browse files Browse the repository at this point in the history
In `class OS_Unix` the arguments in the `execute` method are converted
to UTF-8, but in the `main` program's method they're inserted into a
wide-char `Vector` before translating them from UTF-8 and thus the
non-ASCII characters are lost.

This fix converts the `argv` elements to UTF-8 using `String::utf8`
before inserting them in the `Vector`.
  • Loading branch information
Terseus committed Feb 18, 2014
1 parent 891b2bd commit 666aeac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas

for(int i=0;i<argc;i++) {

args.push_back(argv[i]);
args.push_back(String::utf8(argv[i]));
}

List<String>::Element *I=args.front();
Expand Down

0 comments on commit 666aeac

Please sign in to comment.