Hi!

Alexander Winizki wrote:
> Michael Riepe wrote
> 
>>Hi!
>>
>>Which version do you use, how are the values of $LANG, $LC_CTYPE and
>>$LC_ALL, which file system type, which mount options, and how is the
>>filename encoded?
>>  
> 
> [EMAIL PROTECTED]:~> echo $LANG
> de_DE.UTF-8
> [EMAIL PROTECTED]:~> echo $LC_TYPE
> 
> [EMAIL PROTECTED]:~> echo $LC_ALL
> 
> [EMAIL PROTECTED]:~> cat /etc/fstab
> /dev/disk/by-id/scsi-SATA_WDC_WD2500KS-00_WD-WCANK6717463-part1 
> /media/video215 ext3 defaults 1 2
> ...
> 
> I use OpenSuse 11.0, so the file names are encoded using UTF-8, I 
> suppose. Btw., the mentioned behaviour happens with the latest release 
> version. I didn't try the SVN version yet.

You should. 0.5.4 is pretty buggy with respect to character set handling.

> I'll do it as soon as I have 
> time. I also want to take a look at the sources to see how file names 
> are handled.

Uh... you actually don't want to know that. It's an insane mix of Qt's
own routines (e.g. FileDialog), std::string and Unix system calls which
causes nothing but trouble.

> I thought there is a way to query the system for the 
> character encoding used for file names of a given partition.

That would be sysconf(), or rather (f)pathconf(), I guess.

> Or isn't it 
> some kernel parameter? Does the handling of non-ASCII file names work on 
> your system?

Unask the question, please.

The problem is that the kernel doesn't interpret file names (except the
"/" and "\0" characters). The're treated like a string of bytes, and
many file systems (eg. ext2/ext3) just store them that way. It's up to
the application to give them meaning. Some always write ASCII or Latin-1
encoded file names, others use UTF-8, and yet another group honors the
LC_* variables (or LANG, in your case). I hope that the latest versions
of dvbcut belong to the latter group. I'm not sure, though.

If you're using other file systems (FAT, NTFS, maybe also SMB/CIFS),
these rules aren't valid any longer, though. NTFS, for example, uses
UCS-2 (or UTF-16?) encoding internally, so the kernel has to translate.
How it does that depends on the mount options. And so on...

-- 
Michael "Tired" Riepe <[EMAIL PROTECTED]>
X-Tired: Each morning I get up I die a little

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
DVBCUT-devel mailing list
DVBCUT-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dvbcut-devel

Reply via email to