General discussion

Here you can discuss everything related to MOC which doesn't fit other subforum.

How to deal with encodings?

I have many file and directory names that contain accented characters such as à, é, õ, ç, and they were not displayed correctly in moc-2.5.0-alpha3. They were all replaced by '#' or '##'.

I just installed moc-2.5.0-alpha4. The man page on the new version doesn't say anything about encodings. My only clue is this page:

http://moc.daper.net/node/547

"Add the following options: EnforceTagsEncoding (assume, that if encoding of id3v2 is set to ISO-8859-1, then it is actually ID3v1TagsEncoding), FileNamesIconv (conversion of filenames from local encoding to UTF8), NonUTFXterm (conversion of xterm title from UTF8 to local encoding)."

OK. But how does that work? I can't find any documentation for it. So I did the obvious thing: guessing.

FileNamesIconv = yes

That far it works, now my file names look right. But the tags don't. While some of the accented characters are displayed correctly, others are replaced by '#' or '##'. It does not depend on the file, so I would suppose some files are using different encoding. The problem seems to be on specific characters, namely ã and ê (the ones I have identified so far).

So I did some more guessing:

EnforceTagsEncoding = yes

Nothing changes.

ID3v1TagsEncoding = yes

Nothing changes.

ID3v1TagsEncoding = ISO-8859-1

Nothing changes.

NonUTFXterm = yes

I don't even understand what that one does. Anyway, nothing changes.

Is there any solution to this?

Ubuntu package, PLEASE!

There is no Ubuntu package for the latest release, 2.5.0-alpha4. The download page says:

"Debian packages
MOC is now in Debian unstable, so you can install it using apt-get.
For unstable releases, add the lines below to your sources.list:
deb http://www.lxtec.de/debarchiv unstable main
deb-src http://www.lxtec.de/debarchiv unstable main"

Click that page. It says:

"No more debs here
Changed 04 June 2009
There are no more packages available. moc and mutt can be fetched from the Debian servers. Else mutt compiled with sidebar patch can be build from Debian package, though. If one is interested in xv Debian sources please consider Debian unofficial."

Changed 04 June 2009. That's been more than one year! Can't someone please provide an Ubuntu package? I've been trying to compile source for 15 days now, with no success!

http://moc.daper.net/node/672

It has become a saga that would knock J. R. R. Tolkien down to sleep. Pretty please, with cherry on top or whatever!

Error compiling MOCP

I have moc-2.5.0-alpha3, I want to install moc-2.5.0-alpha4. I added 'deb xxx unstable main' and 'deb-src xxx unstable main' to the repositories in my Ubuntu machine and refreshed the sources, but the new MOCP still doesn't turn up.

So I went for the source, but it won't compile:

http://pastebin.com/y0weZ0KT

What's wrong?

TIA

Last.fm

I found a nice script to use for integration with Last.fm that's pretty extensive and detailed - it should work but it doesn't; it's set as a script for on-song-change. Is there something that's stopping the Last.fm script from being run? I'd also like to know if there's plans for a future release with native Last.fm support.

It seems silly to me that there's *cast support, but not Last.fm.

Alternate Port for client/server?

Hi all - I'm curious if MOC can be run on an alternate port, and controlled on that other/alternate port? I need to start many MOC instances up to queue audio to several devices, and I'd like to be able to do this from a single user account.

Any ideas or thoughts on how to do this?

Thanks!

--shane

Setting Volume balance within each MOCP instance

Hi,

I'd like to run two instances of MOCP to serve two different zones within my offices. I only have one soundcard however with one stereo Line-out.

I'm quite happy to play mono tracks for each zone and wondered if I could simply set MOCP#1 balance to LEFT and MOCP#2 balance to RIGHT and allow each of the instances to stream to either side if the stereo output?

Control of each side of the stereo output could be scripted I guess.

I can make up a simple jack/adapter to split out the sound accordingly to go to either area in our offices, but how to set the balance on each MOCP instance is baffling me. Any help would be greatly appreciated.

Here is a fun Fun FUN Bug you can trigger yourself at home!

Run mocp with a nice long playlist.

Then try to run the following:
$(mocp --next && mocp --format "%song by %artist from %album")

What you will notice after third or fourth trial is that the strings requested `mocp --format` are still the old ones from the previous track while the new track already plays.
I noticed this today as I played around with my emacslisp package for mocp which interfaces with the cli commands provided by mocp.

Now if this isnt a FUN Bug to come across I dont know what else. :-)

Have FUN debugging this one !

native fs encoding option patch

hi all, i wrote patch for optional usage of native filesystem encoding, instead of tries to iconv() names.
moc-2.4.4 stable


diff -Naur moc-2.4.4/config.example moc-2.4.4.new/config.example
--- moc-2.4.4/config.example 2008-04-11 21:54:50.000000000 +0600
+++ moc-2.4.4.new/config.example 2010-06-28 01:05:43.000000000 +0600
@@ -125,6 +125,10 @@
# if UseRCC is set to yes.
#ID3v1TagsEncoding = WINDOWS-1250

+# Do not try to convert filenames and inconvertable tags
+# May bring back national charset, instead of '#'-s
+#NativeFSEncoding = yes
+
# Use librcc to fix ID3 version 1/1.1 tags encoding.
#UseRCC = yes

diff -Naur moc-2.4.4/options.c moc-2.4.4.new/options.c
--- moc-2.4.4/options.c 2007-05-23 00:24:34.000000000 +0600
+++ moc-2.4.4.new/options.c 2010-06-28 00:45:51.000000000 +0600
@@ -217,6 +217,7 @@
option_add_int ("SetXtermTitle", 1);
option_add_int ("PlaylistFullPaths", 1);
option_add_int ("Allow24bitOutput", 0);
+ option_add_int ("NativeFSEncoding", 0);
}

/* Return 1 if a parameter to an integer option is valid. */
@@ -243,6 +244,7 @@
|| !strcasecmp(name, "SetXtermTitle")
|| !strcasecmp(name, "PlaylistFullPaths")
|| !strcasecmp(name, "Allow24bitOutput")
+ || !strcasecmp(name, "NativeFSEncoding")
) {
if (!(val == 1 || val == 0))
return 0;
diff -Naur moc-2.4.4/utf8.c moc-2.4.4.new/utf8.c
--- moc-2.4.4/utf8.c 2007-02-11 17:40:13.000000000 +0500
+++ moc-2.4.4.new/utf8.c 2010-06-28 00:57:47.000000000 +0600
@@ -44,9 +44,11 @@
#include "common.h"
#include "log.h"
#include "utf8.h"
+#include "options.h"

static char *terminal_charset = NULL;
static int using_utf8 = 0;
+static int NativeFSEncoding = 0;

static iconv_t iconv_desc = (iconv_t)(-1);

@@ -63,7 +65,7 @@

if (!str)
return NULL;
- if (desc == (iconv_t)(-1))
+ if (desc == (iconv_t)(-1) || (NativeFSEncoding && str[strlen(str)-1] == '/'))
return xstrdup (str);

str_copy = inbuf = xstrdup (str);
@@ -78,13 +80,16 @@
&outbytesleft)
== (size_t)(-1)) {
if (errno == EILSEQ) {
- inbuf++;
inbytesleft--;
if (!--outbytesleft) {
*outbuf = 0;
break;
}
- *(outbuf++) = '#';
+ if (!NativeFSEncoding)
+ *(outbuf++) = '#';
+ else
+ *(outbuf++) = *inbuf;
+ inbuf++;
}
else if (errno == EINVAL) {
*(outbuf++) = '#';
@@ -320,6 +325,7 @@
if (iconv_desc == (iconv_t)(-1))
logit ("iconv_open() failed: %s", strerror(errno));
}
+ NativeFSEncoding = options_get_int("NativeFSEncoding");
}

void utf8_cleanup ()

Pages

Subscribe to RSS - General discussion