Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
4f32396e
Commit
4f32396e
authored
Sep 19, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid setlocale - not thread-safe
parent
c67038de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
13 deletions
+5
-13
src/text/wincp.c
src/text/wincp.c
+5
-13
No files found.
src/text/wincp.c
View file @
4f32396e
...
...
@@ -55,7 +55,7 @@ static const char *FindFallbackEncoding (const char *locale)
{
if
((
locale
==
NULL
)
||
(
strlen
(
locale
)
<
2
)
||
!
strcasecmp
(
locale
,
"POSIX"
))
return
"
ASCII"
;
return
"
CP1252"
;
/* Yeah, this is totally western-biased */
/*** The ISO-8859 series (anything but Asia) ***/
...
...
@@ -193,20 +193,12 @@ const char *GetFallbackEncoding( void )
#ifndef WIN32
const
char
*
psz_lang
;
/* Some systems (like Darwin, SunOS 4 or DJGPP) have only the C locale.
* Therefore we don't use setlocale here; it would return "C". */
# if defined (HAVE_SETLOCALE) && !defined ( __APPLE__)
psz_lang
=
setlocale
(
LC_ALL
,
NULL
);
if
(
psz_lang
==
NULL
)
# endif
psz_lang
=
getenv
(
"LC_ALL"
);
if
((
psz_lang
==
NULL
)
||
!*
psz_lang
)
{
psz_lang
=
getenv
(
"LC_
ALL
"
);
psz_lang
=
getenv
(
"LC_
CTYPE
"
);
if
((
psz_lang
==
NULL
)
||
!*
psz_lang
)
{
psz_lang
=
getenv
(
"LC_CTYPE"
);
if
((
psz_lang
==
NULL
))
psz_lang
=
getenv
(
"LANG"
);
}
psz_lang
=
getenv
(
"LANG"
);
}
return
FindFallbackEncoding
(
psz_lang
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment