quality value gets truncated when using comma as decimal separator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dir2ogg |
Fix Released
|
Undecided
|
Julian Andres Klode |
Bug Description
I'm using dir2ogg 0.11.8 on Ubuntu Maverick. When using the "smart-mp3" option (-t), it computes a quality value accurate to two decimal places, but when calling oggenc, it replaces the dot with a comma: instead of
oggenc -q 4.51 ...
it does
oggenc -q 4,51 ...
and on my system, oggenc interprets that as -q 4 and reports "Encoding "...wav" to "...ogg" at quality 4.00".
The problem is on lines 441 and 451 of the dir2ogg script, which have:
.replace('.', ',')
The issue seems related to localization and whether the user's locale wants . or , for the decimal separator. Without doing any testing, I'm guessing that oggenc will always interpret "-q 4.51" correctly, so perhaps the replace() calls should be removed. (Or, be made locale-aware.)
Fixed in: /github. com/julian- klode/dir2ogg/ commit/ 78b7172c234397c 9c64ef9a0835e0e 979b3d61db
https:/
I had to localize the input, as oggenc did not accept "." on a German system.