Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
cf8c7b4e
Commit
cf8c7b4e
authored
Feb 21, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use //translit when converting to an non-Unicode charset
parent
a1eb7227
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
src/misc/unicode.c
src/misc/unicode.c
+13
-7
No files found.
src/misc/unicode.c
View file @
cf8c7b4e
...
...
@@ -79,19 +79,25 @@ void LocaleInit( vlc_object_t *p_this )
else
{
/* not UTF-8 */
char
*
psz_conv
=
psz_charset
;
char
psz_buf
[
strlen
(
psz_charset
)
+
sizeof
(
"//translist"
)];
const
char
*
psz_conv
;
/*
* Still allow non-ASCII characters when the locale is not set.
* Western Europeans are being favored for historical reasons.
*/
psz_conv
=
strcmp
(
psz_charset
,
"ASCII"
)
?
psz_charset
:
"ISO-8859-1"
;
if
(
strcmp
(
psz_charset
,
"ASCII"
)
)
{
sprintf
(
psz_buf
,
"%s//translit"
,
psz_charset
);
psz_conv
=
psz_buf
;
}
else
psz_conv
=
"ISO-8859-1//translit"
;
vlc_mutex_init
(
p_this
,
&
from_locale
.
lock
);
vlc_mutex_init
(
p_this
,
&
to_locale
.
lock
);
from_locale
.
hd
=
vlc_iconv_open
(
"UTF-8"
,
psz_c
harset
);
to_locale
.
hd
=
vlc_iconv_open
(
psz_c
harset
,
"UTF-8"
);
from_locale
.
hd
=
vlc_iconv_open
(
"UTF-8"
,
psz_c
onv
);
to_locale
.
hd
=
vlc_iconv_open
(
psz_c
onv
,
"UTF-8"
);
}
free
(
psz_charset
);
...
...
@@ -457,7 +463,7 @@ int utf8_lstat( const char *filename, void *buf)
/*****************************************************************************
* utf8_*printf: *printf with conversion from UTF-8 to local encoding
*****************************************************************************/
int
utf8_vasprintf
(
char
**
str
,
const
char
*
fmt
,
va_list
ap
)
static
int
utf8_vasprintf
(
char
**
str
,
const
char
*
fmt
,
va_list
ap
)
{
char
*
utf8
;
int
res
=
vasprintf
(
&
utf8
,
fmt
,
ap
);
...
...
@@ -469,7 +475,7 @@ int utf8_vasprintf( char **str, const char *fmt, va_list ap )
return
res
;
}
int
utf8_vfprintf
(
FILE
*
stream
,
const
char
*
fmt
,
va_list
ap
)
static
int
utf8_vfprintf
(
FILE
*
stream
,
const
char
*
fmt
,
va_list
ap
)
{
char
*
str
;
int
res
=
utf8_vasprintf
(
&
str
,
fmt
,
ap
);
...
...
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