small unicode fixes

This commit is contained in:
Juan Linietsky 2015-05-04 13:12:05 -03:00
parent ad634876b5
commit 7f5b744b92
2 changed files with 8 additions and 7 deletions

View file

@ -197,7 +197,7 @@ Error DirAccessWindows::change_dir(String p_dir) {
if (worked) {
GetCurrentDirectoryW(2048,real_current_dir_name);
current_dir=real_current_dir_name; // TODO, utf8 parser
current_dir=real_current_dir_name;
current_dir=current_dir.replace("\\","/");
} //else {
@ -218,7 +218,7 @@ Error DirAccessWindows::change_dir(String p_dir) {
if (worked) {
GetCurrentDirectoryA(2048,real_current_dir_name);
current_dir=real_current_dir_name; // TODO, utf8 parser
current_dir=real_current_dir_name;
current_dir=current_dir.replace("\\","/");
}// else {

View file

@ -2110,12 +2110,13 @@ bool OS_Windows::has_environment(const String& p_var) const {
String OS_Windows::get_environment(const String& p_var) const {
char* val = getenv(p_var.utf8().get_data());
if (val)
return val;
wchar_t wval[0x7Fff]; // MSDN says 32767 char is the maximum
int wlen = GetEnvironmentVariableW(p_var.c_str(),wval,0x7Fff);
if ( wlen > 0 ) {
return wval;
}
return "";
};
}
String OS_Windows::get_stdin_string(bool p_block) {