quality value gets truncated when using comma as decimal separator

Bug #691047 reported by Dan Drake
12
This bug affects 2 people
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.)

Revision history for this message
Julian Andres Klode (juliank) wrote :

Fixed in:
  https://github.com/julian-klode/dir2ogg/commit/78b7172c234397c9c64ef9a0835e0e979b3d61db

I had to localize the input, as oggenc did not accept "." on a German system.

Changed in dir2ogg:
assignee: nobody → Julian Andres Klode (juliank)
status: New → Fix Committed
Revision history for this message
Julian Andres Klode (juliank) wrote :

Fixed in 0.12

Changed in dir2ogg:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.