[MPlayer-dev-eng] [PATCH] Use _NET_WM_NAME for UTF-8 title in X11 if supported

Uoti Urpala uoti.urpala at pp1.inet.fi
Tue Jun 20 22:32:48 CEST 2006


On Tue, 2006-06-20 at 22:17 +0200, Reimar Döffinger wrote:
> I think it's even more complicated. Can't the filesystem (or more
> precisely the file I/O functions) use a different encoding then the
> terminal?

On most Unix filesystems there no per-filesystem encoding. Any user can
create almost whatever byte sequences and there's no guarantee they'll
display properly in other user's shell, but the sanest default is to
assume the encoding matches LC_CTYPE.

> If I am right, my idea for the final solution would be converting the
> strings on the command line to UTF-8 when parsing, and if necessary
> convert once again on open.

Won't work. The filenames given on command line might not be valid
encodings according to user's current locale, and thus they cannot be
converted from that locale to utf-8 in a way which would allow
converting back before open().





More information about the MPlayer-dev-eng mailing list