diff options
| author | Terseus | 2014-02-18 14:37:22 +0100 |
|---|---|---|
| committer | Terseus | 2014-02-18 14:37:22 +0100 |
| commit | 666aeac7137fdd43504c68944597a970e4d0f46c (patch) | |
| tree | 670642eb70a9412527f4e2b0b0556c983bb12eb9 /main/main.cpp | |
| parent | 891b2bdb4f2d1a1a6a1021ae569242fdf184cacc (diff) | |
| download | godot-666aeac7137fdd43504c68944597a970e4d0f46c.tar.gz godot-666aeac7137fdd43504c68944597a970e4d0f46c.tar.zst godot-666aeac7137fdd43504c68944597a970e4d0f46c.zip | |
Fix #19 Can't open project (with non-ASCII path)
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`.
Diffstat (limited to 'main/main.cpp')
| -rw-r--r-- | main/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp index 21fb61c81..b4b9b93e8 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -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(); |
