Am Dienstag, 4. September 2007 schrieb Michael Riepe: > Hi! > > Michael Kreuzer wrote: > > dvbcut has problems with filenames containing unicode characters like > > german umlauts. > > It also has problems with ISO-8859-1 (aka Latin-1) style umlauts. > > > Attached is a patch which will fix this. The problem is, that when > > you convert from a QString to a std::string or vice versa you have to > > encode/decode the string. I hope i have found all locations where to > > encode/decode the string. > > And how does dvbcut know *how* to encode/decode it? Does it look at my > locale settings (e.g. LC_CTYPE) or does it just guess? In either case, > it will be as wrong as the current version. It use the locale settings. > > The problem is that filenames [...]
The real cause is not the filename itself it is the conversion from QString to std::string and back, because the internal format of QString is unicode whereas std::string is using ascii. So you loose the unicode information here. If you don't want to loose information at this conversion, you have to convert between 8-Bit strings and unicode strings with the encode/decode method of QFile or with the conversion methods of QString (fromLocal8Bit,toLocal8Bit) which uses your locale settings. Michael ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ DVBCUT-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dvbcut-user
