wiki:Cdrtools

Version 6 (modified by andy@…, 18 years ago) ( diff )

--

Cdrtools

cdrecord has ISO-8859-1 characters hard-coded in its messages. Thus, they can't be displayed properly in locales using other character sets. Also, they make some UTF-8 terminal emulators upset. If you have Glibc and the de_DE locale and understand legal consequences of doing that, run the commands below to convert messages to ASCII approximations (e.g., "J<wrong or invalid character>rg Schilling" -> "Joerg Schilling"). Alternatively, apply this patch that has the same legal consequences.

for F in cdrecord/cdrecord.c cdrecord/diskid.c cdrecord/sector.c \
    readcd/readcd.c scgcheck/scgcheck.c scgskeleton/skel.c ; do
    LC_ALL=de_DE iconv -f ISO-8859-1 -t US-ASCII//TRANSLIT $F >tmp
    mv -f tmp $F
done

The comment in cdrecord.c states that, because of GPL requirements, you are not allowed to do that (because these commands modify the copyright notices), but how can a copyright notice containing invalid byte sequences be valid? RedHat ignores this comment and patches copyright notices.


When creating an ISO image with Joliet extensions (for long file names on MS Windows) using unpatched mkisofs, it is necessary to specify the input filename character set with the -input-charset (or, equivalently, -jcharset) option, unless it is ISO-8859-1 (the default). The character set name passed after this switch must match the output of "locale charmap". A mismatch results in completely wrong non-ASCII characters in the filenames under MS Windows.

Problem 1: unpatched mkisofs accepts only character sets listed in the "mkisofs -input-charset help" output, and UTF-8 is not in the list.

Problem 2: some GUI frontends don't know that this option has to be passed, and don't allow a user to add it at all.

Both problems can be solved with this patch. It does the following:

  • Makes mkisofs accept any character set supported by iconv as the input character set
  • Changes the default input character set to the character set implied by the current locale

The net effect is that creation of ISO images with Joliet extensions becomes possible in any locale, and the -input-charset switch becomes needed only in very exceptional situations.

IMPORTANT: never report problems with charset set support directly to Joerg Schilling!


Burn mp3s onto an Audio CD

If you have lame installed you can burn mp3s to a CD that will play in an ordinary audio CD player with a simple script like this

#!/bin/bash -e
count=0

for TRACK in *
do
lame --decode "$TRACK" $((++count)).wav
rm -f "$TRACK"
done

cdrecord dev=/dev/hdc -audio -pad $(ls)

Change dev=/dev/hdc to suit your system.

Get a copy of the tracks you want into one folder, cd into the folder, put a blank CD in the drive and then run the script

Up
Top

Note: See TracWiki for help on using the wiki.