Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files with non ASCII characters do not get saved correctly #2

Closed
juliusvdijk opened this issue Dec 13, 2015 · 10 comments
Closed

Files with non ASCII characters do not get saved correctly #2

juliusvdijk opened this issue Dec 13, 2015 · 10 comments

Comments

@juliusvdijk
Copy link
Contributor

In my library there is a file "Major Lazer & DJ Snake - Lean On (feat. MØ) (Official Music Video).mp3" which is unplayable because the file path is stored as "Major Lazer & DJ Snake - Lean On (feat. M?) (Official Music Video).mp3".

I am able to store the Ø character in the song table which also fixes the playback issue.

This issue is happening with all non ASCII characters.

@phanan
Copy link
Member

phanan commented Dec 13, 2015

Hmm. What DBMS are you using? I have quite a few Chinese songs in my MySQL and it works fine:

image

@phanan
Copy link
Member

phanan commented Dec 13, 2015

And

image

@juliusvdijk
Copy link
Contributor Author

I am using MySQL on Windows using XAMPP.

In the console I am able to view the correct path so for some reason it just does not want to save in the right encoding. I tried to convert the encoding with mb_convert_encoding but that did not work.

However the title field gets saved succesfully...
Title: Major Lazer (Feat. MØ & DJ Snake) - Lean On (Claes Lanng Tropical Mix)
Path: .......\Major Lazer - Lean On (feat. M? & DJ Snake).mp3

@phanan
Copy link
Member

phanan commented Dec 13, 2015

I don't have a Windows box here, so... can you dd($file->getPathname()) here and see if it's a PHP problem?

@juliusvdijk
Copy link
Contributor Author

I've added this code:

        if ($syncCommand) {
            $syncCommand->info($file->getPathname());
        }

I ran php artisan koel:sync --verbose and got this output.

.........\\Major Lazer - Lean On (feat. MØ & DJ Snake).mp3
Major Lazer - Lean On (feat. MØ & DJ Snake).mp3 has no changes – ignoring

In the database it is stored as:

.........\\Major Lazer - Lean On (feat. M? & DJ Snake).mp3
Major Lazer (Feat. MØ & DJ Snake) - Lean On (Claes Lanng Tropical Mix)

@phanan
Copy link
Member

phanan commented Dec 13, 2015

Just to double-check, what encoding is there for the field/table/db?

@juliusvdijk
Copy link
Contributor Author

DB collation

The weirdest thing is that it saves the title from the ID3 tags correctly but not the path.

I overrode the updateOrCreate and the value of the path is still correct, I have no clue why that character gets converted to a ?.

@phanan
Copy link
Member

phanan commented Dec 14, 2015

I don't know honestly. Once you enter updateOrCreate(), it's the framework (Laravel) job. From what I know, there's no configuration that may affect this. Maybe open an issue here?

@juliusvdijk
Copy link
Contributor Author

It seems to be an issue related to my PHP environment, I'll try running it in a virtual Linux environment to check if that fixes it.

@phanan
Copy link
Member

phanan commented Dec 14, 2015

👍 I'll go ahead and close this issue then. Feel free to open a new one if the problem persists for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants