Create mix record fail in music library(path with non-ascii character)

Bug #938648 reported by jack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Daniel Schürmann

Bug Description

under Ubuntu 10.04

If the path to the music library contain non-ascii character.

(like /home/user/音乐)

Record Mix function in Mixxx can't handle correctly with the path.

And popup file create fail dialog, cause by permission or not enough

disk space.

but folder Mixxx/Recordings can create under such path.

################################################

$locale

LANG=zh_CN.UTF-8
LANGUAGE=zh_CN:en
LC_CTYPE="zh_CN.UTF-8"
LC_NUMERIC="zh_CN.UTF-8"
LC_TIME="zh_CN.UTF-8"
LC_COLLATE="zh_CN.UTF-8"
LC_MONETARY="zh_CN.UTF-8"
LC_MESSAGES="zh_CN.UTF-8"
LC_PAPER="zh_CN.UTF-8"
LC_NAME="zh_CN.UTF-8"
LC_ADDRESS="zh_CN.UTF-8"
LC_TELEPHONE="zh_CN.UTF-8"
LC_MEASUREMENT="zh_CN.UTF-8"
LC_IDENTIFICATION="zh_CN.UTF-8"
LC_ALL=

Related branches

Changed in mixxx:
assignee: nobody → Daniel Schürmann (daschuer)
Revision history for this message
Daniel Schürmann (daschuer) wrote :

the attached patch solves the problem for lp:mixxx #2987.
It was tested on ubuntu lucid only.

Changed in mixxx:
status: New → In Progress
jus (jus)
Changed in mixxx:
importance: Undecided → Medium
milestone: none → 1.10.1
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Hey Daniel,

I see you use toLocal8Bit() as the argument to sf_open. In src/soundsourcesndfile.cpp you'll see that on Windows we use toLocal8Bit() but on all others we use toUtf8().

Does toUtf8() work as well? Even if it does, I'd prefer we duplicate the logic in src/soundsourcesndfile.cpp unless you know of a reason not to.

Also, we should probably get people to test this on Windows, Mac and Linux before committing.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Hi RJ

toLocal8Bit does the Magic:
* on Linux its result is equal to toUtf8()
* on Windows it is equal to toLatin1() in my case.

Regards,

Daniel

Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: [Bug 938648] Re: Create mix record fail in music library(path with non-ascii character)

Here's the implementation of toLocal8Bit():
https://qt.gitorious.org/qt/qt/blobs/4.8/src/corelib/tools/qstring.cpp#line3763

So as the name implies it's locale dependent. I wonder this could ever
cause problems in a locale where the default is not either UTF-8 or Latin1.
Maybe we could look for someone whose system locale is JIS/KOI/etc. to
confirm?

2012/3/13 Daniel Schürmann <email address hidden>

> Hi RJ
>
> toLocal8Bit does the Magic:
> * on Linux its result is equal to toUtf8()
> * on Windows it is equal to toLatin1() in my case.
>
> Regards,
>
> Daniel
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/938648
>
> Title:
> Create mix record fail in music library(path with non-ascii
> character)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/938648/+subscriptions
>

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I went ahead and committed the patch. If it fails we'll probably hear about it.

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6282

lock status: Metadata changes locked and limited to project staff
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.