summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerseus <terseus@gmail.com>2014-02-18 14:37:22 +0100
committerTerseus <terseus@gmail.com>2014-02-18 14:37:22 +0100
commit666aeac7137fdd43504c68944597a970e4d0f46c (patch)
tree670642eb70a9412527f4e2b0b0556c983bb12eb9
parent891b2bdb4f2d1a1a6a1021ae569242fdf184cacc (diff)
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`.
-rw-r--r--main/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 21fb61c81e..b4b9b93e89 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();