Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
a6e49e68
Commit
a6e49e68
authored
Jun 12, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
config: assume
UTF-8
vlcrc
8 and a half years should have been enough to transition.
parent
8309626d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
src/config/file.c
src/config/file.c
+3
-9
No files found.
src/config/file.c
View file @
a6e49e68
...
@@ -174,16 +174,10 @@ int config_LoadConfigFile( vlc_object_t *p_this )
...
@@ -174,16 +174,10 @@ int config_LoadConfigFile( vlc_object_t *p_this )
if
(
file
==
NULL
)
if
(
file
==
NULL
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
/* Look for UTF-8 Byte Order Mark */
/* Skip UTF-8 Byte Order Mark if present */
char
*
(
*
convert
)
(
const
char
*
)
=
strdupnull
;
char
bom
[
3
];
char
bom
[
3
];
if
(
fread
(
bom
,
1
,
3
,
file
)
!=
3
||
memcmp
(
bom
,
"
\xEF\xBB\xBF
"
,
3
))
if
((
fread
(
bom
,
1
,
3
,
file
)
!=
3
)
||
memcmp
(
bom
,
"
\xEF\xBB\xBF
"
,
3
))
{
convert
=
FromLocaleDup
;
rewind
(
file
);
/* no BOM, rewind */
rewind
(
file
);
/* no BOM, rewind */
}
char
*
line
=
NULL
;
char
*
line
=
NULL
;
size_t
bufsize
;
size_t
bufsize
;
...
@@ -243,7 +237,7 @@ int config_LoadConfigFile( vlc_object_t *p_this )
...
@@ -243,7 +237,7 @@ int config_LoadConfigFile( vlc_object_t *p_this )
default:
default:
free
((
char
*
)
item
->
value
.
psz
);
free
((
char
*
)
item
->
value
.
psz
);
item
->
value
.
psz
=
convert
(
psz_option_value
);
item
->
value
.
psz
=
strdupnull
(
psz_option_value
);
break
;
break
;
}
}
}
}
...
...
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