UTF-8 tags and some problems with 2.4.0 beta 1

Hello, I just installed moc 2.4.0 beta1 and it's very nice! The UTF-8 support in particular is something I've been waiting for - moc was my favourite music player even without this, but it's somewhat inconvenient when you have lots of music with non-ASCII titles ;-)

Now, UTF-8 display indeed works for filenames, but not for tags. I use UTF-8 tags, moc interprets them as Latin-1. Should I set something in the config file? The only option in config.example that seemed relevant was TagsIconv, but I see it's deprecated now.

A problem I enountered: when the front-end enters directories with long names and non-ascii characters, it crashes with:

*** glibc detected *** free(): invalid next size (fast): 0x080df088 ***

For example, I get a crash when I try to enter a directory named "αααααααααααααααααααααααααα" (that's 26 times the greek letter alpha).

Another (cosmetic) problem: with files containing double-width characters (Japanese etc.) the display isn't absolutely correct. Here's a screenshot:

http://members.hellug.gr/adia/m/mocp.png

Thanks!


Now, UTF-8 display indeed works for filenames, but not for tags.

I think it's something with libid3tag, I must take a closer look at it. Are vorbis files also broken?


A problem I enountered: when the front-end enters directories with long names and non-ascii characters, it crashes.

I know where is the problem, I'll fix it, thanks.


Another (cosmetic) problem: with files containing double-width characters (Japanese etc.) the display isn't absolutely correct.

It's not just a cosmetic problem, there are few places in the source code where I assume 1 char == 1 column. It's my fault, I didn't relize it's so important and ignored this problem because fixing it is not so easy. I had no experience with UTF-8 before.

--
Damian Pietras - MOC developer

I hadn't checked vorbis files, but I just did, and they show up correctly.

Thanks again!

Alexandros

Can you use the current SVN version (http://moc.daper.net/download#development) and see if mp3 tags are still wrong? I've also changed code related to strings width, but can't test it.

--
Damian Pietras - MOC developer

Sorry I took so long to reply... I just compiled the SVN version and mp3 tags show up correctly. Also the crash doesn't happen any more. Thank you!

The only problem still remaining is the one with double-width characters... they still overflow their fields.

I'll try to fix it, but it would be better if someone who actually uses such character set could try to do it.

--
Damian Pietras - MOC developer

This problem was caused by a couple of UTF-8 handling bugs.

Fixed by r2519 and r2520.