Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2350)

Unified Diff: runtime/bin/platform_android.cc

Issue 2843343002: [dart:io] Make Platform.localeName fall back on en_US if LANG is not defined (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/platform_fuchsia.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/platform_android.cc
diff --git a/runtime/bin/platform_android.cc b/runtime/bin/platform_android.cc
index cba7fa497e28561a0667c6eefabb1de84a361559..b72e3b8b14b65d74a0c10d9daecbf8a84620ad18 100644
--- a/runtime/bin/platform_android.cc
+++ b/runtime/bin/platform_android.cc
@@ -58,7 +58,11 @@ const char* Platform::LibraryExtension() {
const char* Platform::LocaleName() {
- return getenv("LANG");
+ char* lang = getenv("LANG");
+ if (lang == NULL) {
+ return "en_US";
+ }
+ return lang;
}
« no previous file with comments | « no previous file | runtime/bin/platform_fuchsia.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698