On Tue, Jan 02, 2007 at 02:14:53AM +0100, Tobias Ulmer wrote:
> There is no common character encoding for ID3 tags, anything that is not
> compatible with UTF-8 or ASCII results in an error message with ncmpc.
> This diff fixes the ugly "Unable to convert.." message by using a glib
> funktion that replaces broken chars with '?'.
ncmpc crashes here when trying to enter the directory [El??kel??iset]
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "amd64-unknown-openbsd4.0"...
Core was generated by `ncmpc'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/local/lib/libglib-2.0.so.1000.3...done.
Loaded symbols for /usr/local/lib/libglib-2.0.so.1000.3
Reading symbols from /usr/local/lib/libintl.so.3.0...done.
Loaded symbols for /usr/local/lib/libintl.so.3.0
Reading symbols from /usr/local/lib/libiconv.so.4.0...done.
Loaded symbols for /usr/local/lib/libiconv.so.4.0
Reading symbols from /usr/lib/libncurses.so.10.0...done.
Loaded symbols for /usr/lib/libncurses.so.10.0
Reading symbols from /usr/lib/libc.so.40.3...done.
Loaded symbols for /usr/lib/libc.so.40.3
Reading symbols from /usr/libexec/ld.so...done.
Loaded symbols for /usr/libexec/ld.so
#0 sync_highlights (c=0x4dcd6080, filelist=0x0) at screen_file.c:102
102 GList *list = g_list_first(filelist->list);
(gdb) bt
#0 sync_highlights (c=0x4dcd6080, filelist=0x0) at screen_file.c:102
#1 0x000000000040cfbc in change_directory (screen=0x4dcd6080, c=0x4dcd6080,
entry=0x7) at screen_file.c:268
#2 0x000000000040d864 in browse_cmd (screen=0x4dcd6080, c=0x4dcd6080,
cmd=CMD_PLAY) at screen_file.c:640
#3 0x000000000040b9f8 in screen_cmd (c=0x4dcd6080, cmd=CMD_PLAY)
at screen.c:886
#4 0x0000000000406dfd in main (argc=1, argv=0x7f7ffffcf7d0) at main.c:308
(gdb)
jasper
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/audio/ncmpc/Makefile,v
> retrieving revision 1.4
> diff -u -r1.4 Makefile
> --- Makefile 16 Dec 2006 12:22:32 -0000 1.4
> +++ Makefile 2 Jan 2007 01:01:21 -0000
> @@ -6,6 +6,7 @@
> COMMENT= "curses based frontend for mpd"
>
> DISTNAME= ncmpc-0.11.1
> +PKGNAME= ${DISTNAME}p0
> CATEGORIES= audio
>
> HOMEPAGE= http://hem.bredband.net/kaw/ncmpc/
> Index: patches/patch-src_support_c
> ===================================================================
> RCS file: patches/patch-src_support_c
> diff -N patches/patch-src_support_c
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_support_c 2 Jan 2007 01:01:21 -0000
> @@ -0,0 +1,15 @@
> +--- src/support.c.orig Sun Jan 23 18:37:41 2005
> ++++ src/support.c Tue Jan 2 01:53:34 2007
> +@@ -156,10 +156,8 @@
> + rb = 0; /* bytes read */
> + wb = 0; /* bytes written */
> + error = NULL;
> +- str=g_locale_from_utf8(utf8str,
> +- strlen(utf8str),
> +- &wb, &rb,
> +- &error);
> ++ str = g_convert_with_fallback(
> ++ utf8str, -1, "ASCII", "UTF-8", "?", &rb, &wb, &error);
> + if( error )
> + {
> + const char *charset;
>
>
> --
> Gnu's Not Useful
>
>
--
``This statement is false''
NedBSD: http://nedbsd.eu