transcoding files with scandinavian characters does not work

Bug #360411 reported by Kristoffer Bergström
2
Affects Status Importance Assigned to Milestone
Ampache4
Won't Fix
Unknown
ampache (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

Binary package hint: ampache

On Jaunty updated today. Ampache version 3.4.4-0ubuntu1.

I can't stream flac-files with scandinavian characters that are being transcoded to mp3.
Log:
2009-04-13 12:06:00 { toffe } ( auto_transcode ) - Transcoding to flac
2009-04-13 12:06:00 { toffe } ( downsample ) - Starting Downsample...
2009-04-13 12:06:00 { toffe } ( downsample ) - Start Downsample: flac -dc '/home/kbergstr/Musiikki/Fork/Helsinki/02 - Taivas Ly Tulta-Over the Hills.flac' | lame -rb 192 -S - -
2009-04-13 12:06:00 { toffe } ( stream ) - Starting stream of /home/kbergstr/Musiikki/Fork/Helsinki/02 - Taivas Lyö Tulta-Over the Hills.flac with size 8167050
2009-04-13 12:06:07 { toffe } ( stream ) - 1253 of 8167050 streamed, less than 4083525 not collecting stats
2009-04-13 12:06:07 { toffe } ( stream ) - Stream Ended at 1253 bytes out of 8167050

It's seems that it looses the ö-character in the transcoding command. The changelog for 3.5.0-beta2 says something about multibyte characters. Might be related.

Revision history for this message
Kristoffer Bergström (kabtoffe) wrote :

narrowed down the problem to the following line in /usr/share/ampache/www/lib/class/stream.class.php

$song_file = escapeshellarg($song->file);

Changing this to $song_file = $song->file; almost works, but not for paths with spaces (which is most of them). Besides it would have been a workaround at best.

I'll continue googling...

Revision history for this message
Kristoffer Bergström (kabtoffe) wrote :

Ok. the solution was pretty obvious, adding the line: setlocale(LC_ALL,'fi_FI.utf8'); above the other one.

Could someone point me to the direction where this should be set globally? Shouldn't it be set for me?

Revision history for this message
Kristoffer Bergström (kabtoffe) wrote :

locale
LANG=fi_FI.UTF-8
LC_CTYPE="fi_FI.UTF-8"
LC_NUMERIC="fi_FI.UTF-8"
LC_TIME="fi_FI.UTF-8"
LC_COLLATE="fi_FI.UTF-8"
LC_MONETARY="fi_FI.UTF-8"
LC_MESSAGES="fi_FI.UTF-8"
LC_PAPER="fi_FI.UTF-8"
LC_NAME="fi_FI.UTF-8"
LC_ADDRESS="fi_FI.UTF-8"
LC_TELEPHONE="fi_FI.UTF-8"
LC_MEASUREMENT="fi_FI.UTF-8"
LC_IDENTIFICATION="fi_FI.UTF-8"
LC_ALL=

LC_ALL doesn't seem to be set by default. I'll add it to /etc/environment.

Revision history for this message
Charlie_Smotherman (cjsmo) wrote :

Kristoffer,

Thank you for your bug report. I have forwarded this bug upstream.

http://ampache.org/bugs/ticket/437

Thanks

Charlie Smotherman
(porthose)

Revision history for this message
Charlie_Smotherman (cjsmo) wrote :

Upstream reported back on this bug

"That actually looks like a php / charset bug. Ampache obviously has the right filename, it appears as though the escapeshellarg() is stripping it. Either way. Not doing any non-security related fixes to 3.4.4."

Ampache-3.5 which is due out late April, early May.

Emmet Hikory (persia)
Changed in ampache (Ubuntu):
status: New → Triaged
Revision history for this message
Kristoffer Bergström (kabtoffe) wrote :

There might be a hidden bug in ubuntu's php / apache.
Shouldn't LC_ALL be set already??? Without any action on the users part. All the other variables were set...
If it were ampache would have worked out of the box...

Changed in ampache4:
status: Unknown → Won't Fix
Changed in ampache (Ubuntu):
importance: Undecided → Wishlist
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (5.1 KiB)

This bug was fixed in the package ampache - 3.5.1-0ubuntu1

---------------
ampache (3.5.1-0ubuntu1) karmic; urgency=low

   * New upstream release. Summary of new features: (LP: #377016)
     - Make the PHP error a little clearer for windows users by indicating
       that their version of PHP is < 5.3 (required for windows)
     - Fix random methods not working for Localplay
     - Fix extra space on prefixed albums (Thx ibizaman)
     - Add missing operator on tag and rating searches so they will
       work with other methods (Thx <email address hidden>)
     - Fix get_art_url() so it returns something...
     - Fix problem with creating new playlists where it doesn't work
       but appending to an existing did.
     - Fixed issue with url_to_song, also cleaned up the code a bit
     - Fixed issue with Random All Catalogs
     - Fixed issues with API and Tag methods not working as advertised
     - Fix endless loop in getid3() with malformed genre tags in mp3s
     - Fixed show test page always returning false on web path
     - Update Man page to adhear to newer Debian rules
     - Fixed issue with Videos being incorrectly registered with stats
       and now playing as songs.
     - Fixed missing > in HTML for song row
   * Bumped Standards-Version to 3.8.2, no changes needed.
   * Bumped debhelper to dh 7.
     - increased debian/compat to 7.
     - debian/rules removed dh_clean -k in favor of dh_prep
   * Lintian complains of FreeMonoMedium.ttf being an embeded fonts package.
     FreeMonoMedium.ttf is actually part of the ttf-freefont package.
     - added ttf-freefont to the Depends section of debian/control.
     - added -XFreeMono-Medium to dh_install in debian/rules.
     - added FreeMono.ttf symbolic link to debian/links.
   * Lintian complains of the wrong file permissions for
     - /locale/base/gather-messages.sh, added -Xgather-messages.sh to
    debian/rules, gather-messages.sh is not used by ampache proper and
    can be safely removed. It is only utilized by developers who are
    creating or editing the translation files.
     - /locale/pl_PL/LC_MESSAGES/messages.po added find and chmod rule
    to debian/rules.
     - /locale/pl_PL/LC_MESSAGES/messages.mo added find and chmod rule
    to debian/rules.
     - /docs/CHANGELOG added find and chmod rule to debian/rules.
   * Lintian complains of wrong-name-for-upstream-changelog
     - install upstream CHANGELOG to /usr/share/ampache/www/docs
     - added find and gzip -9 rule to debian/rules
     - added symlink creation to debian/links to link
        /usr/share/ampache/www/docs/CHANGELOG.gz to
        /usr/share/doc/ampache/changelog.gz
   * Lacy Marrow has responded and has stated that he is dropping the GPL-3
     licensing of his work and is now releasing version 5.9.5 of the
     XSPF JukeBox under the same BSD license that the original version of XSPF
     Music Player was released under (XSPF JukeBox is based on XSPF Music
     Player). So now XSPF Music Player and XSPF JukeBox are now released under
     the same BSD type license. This closes RC Bug #526719. Closes: #526719
     - Updated debian/copyright to refect this.
   * Added dh_installman to deb...

Read more...

Changed in ampache (Ubuntu):
status: Triaged → 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.