diff options
Diffstat (limited to 'app/bin/manifest.c')
-rw-r--r-- | app/bin/manifest.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/app/bin/manifest.c b/app/bin/manifest.c index 1652996..5fd9b5a 100644 --- a/app/bin/manifest.c +++ b/app/bin/manifest.c @@ -56,9 +56,9 @@ char* CreateManifest(char* nameOfLayout, char* background, char *copyOfFileName = MyStrdup(nameOfLayout); cJSON* a_object = cJSON_CreateObject(); cJSON_AddItemToObject(manifest, "layout", a_object); -#ifdef WINDOWS +#ifdef UTFCONVERT copyOfFileName = Convert2UTF8(copyOfFileName); -#endif // WINDOWS +#endif // UTFCONVERT cJSON_AddStringToObject(a_object, "name", copyOfFileName); MyFree(copyOfFileName); @@ -69,16 +69,16 @@ char* CreateManifest(char* nameOfLayout, char* background, cJSON_AddStringToObject(b_object, "name", "background"); backg = MyStrdup(FindFilename(background)); -#ifdef WINDOWS +#ifdef UTFCONVERT backg = Convert2UTF8(backg); #endif cJSON_AddStringToObject(b_object, "filename", backg); MyFree(backg); backg = MyStrdup(background); -#ifdef WINDOWS +#ifdef UTFCONVERT backg = Convert2UTF8(backg); ConvertPathForward(backg); -#endif // WINDOWS +#endif // UTFCONVERT cJSON_AddStringToObject(b_object, "copy-path", backg); cJSON_AddStringToObject(b_object, "arch-path", dependencyDir); MyFree(backg); @@ -108,16 +108,16 @@ char* ParseManifest(char* manifest, char* zip_directory) char* background_file[1] = { NULL }; char* layoutname; - char *oldLocale = SaveLocale("C"); + SetCLocale(); cJSON* json_manifest = cJSON_Parse(manifest); - RestoreLocale(oldLocale); + SetUserLocale(); cJSON* layout = cJSON_GetObjectItemCaseSensitive(json_manifest, "layout"); cJSON* name = cJSON_GetObjectItemCaseSensitive(layout, "name"); layoutname = cJSON_GetStringValue(name); -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(layoutname); -#endif // WINDOWS +#endif // UTFCONVERT LOG(log_zip, 1, ("Zip-Manifest %s \n", layoutname)) #if DEBUG @@ -136,7 +136,7 @@ char* ParseManifest(char* manifest, char* zip_directory) cJSON* archpath = cJSON_GetObjectItemCaseSensitive(dependency, "arch-path"); file = MyStrdup(cJSON_GetStringValue(filename)); path = MyStrdup(cJSON_GetStringValue(archpath)); -#ifdef WINDOWS +#ifdef UTFCONVERT ConvertUTF8ToSystem(file); ConvertUTF8ToSystem(path); #endif |