Skip to content

Commit

Permalink
Add locale warning.
Browse files Browse the repository at this point in the history
Adds a check in the corecontext constructor to check for the value of
LANG, and if undefined or set to 'C', warn the user that they should be
running UTF.
  • Loading branch information
wagnerrp committed Aug 22, 2011
1 parent c5847e1 commit 0fd3987
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mythtv/libs/libmythbase/mythcorecontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,15 @@ bool MythCoreContext::Init(void)
return false;
}

#ifndef _WIN32
char *lang = getenv("LANG");
if (!strcmp(lang, "C") || (strlen(lang) == 0))
LOG(VB_GENERAL, LOG_WARNING,
"This application expects to be running a UTF locale, and "
"many features may behave improperly with your current LANG "
"set to 'C'. Please consider correcting this.");
#endif

has_ipv6 = false;

// If any of the IPs on any interfaces look like IPv6 addresses, assume IPv6
Expand Down

0 comments on commit 0fd3987

Please sign in to comment.