Opened 14 years ago

Last modified 14 years ago

#1716 new defect

[mp_msg] iconv(3) "noconv" and conversion from FOO to FOO

Reported by: bugmenot@… Owned by: reimar
Priority: normal Component: core
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

bsdiconv doesn't support same charset conversion

$ mplayer -noconfig all
iconv: conversion from UTF-8 to UTF-8 unsupported
/usr/lib/i18n/libiconv_none.so.4: unsupported file layoutMPlayer git-79036c8-4.5.1 (C) 2000-2010 MPlayer Team
iconv: conversion from UTF-8 to UTF-8 unsupported
Usage: mplayer [options] [url|path/]filename

So, copy strcasecmp() comparison from filename_recode() to mp_msg().

%%
Index: mp_msg.c
===================================================================
--- mp_msg.c (revision 31423)
+++ mp_msg.c (working copy)
@@ -190,7 +190,9 @@

tmp[MSGSIZE_MAX-1] = 0;


#if defined(CONFIG_ICONV) && defined(MSG_CHARSET)

  • if (mp_msg_charset && strcasecmp(mp_msg_charset, "noconv")) {

+ if (mp_msg_charset &&
+ strcasecmp(mp_msg_charset, MSG_CHARSET) &&
+ strcasecmp(mp_msg_charset, "noconv")) {

char tmp2[MSGSIZE_MAX];
size_t inlen = strlen(tmp), outlen = MSGSIZE_MAX;
char *in = tmp, *out = tmp2;

%%

Change History (2)

comment:1 by bugmenot@…, 14 years ago

Summary: [iconv] conversion from FOO to FOO unsupported[mp_msg] iconv(3) "noconv" and conversion from FOO to FOO

It's was my installation of bsdiconv that was broken. However, I still think conversion from FOO to FOO should get same treatment as "noconv".

comment:2 by bugmenot@…, 14 years ago

op_sys: FreeBSDAll
Note: See TracTickets for help on using tickets.