Comments (8)
This is to my knowledge a limitation of PHP 5.x on Windows. Can you try upgrading to PHP 7 as a workaround, and see if it works out?
from koel.
Oh I'm so sorry I didn't attach my system information.
Yes, I followed your wiki to install Koel, so I'm using PHP7.0
Windows10 Edu
Apache/2.4.18 (Win32)
Laravel 5.1
PHP/7.0.0
5.7.10-log - MySQL Community Server (GPL)
from koel.
Hmm. You mentioned to have added some code to convert from GBK to UTF8, can you share with me the code?
from koel.
OK.
In fact, in my test I use iconv("GBK","UTF-8//IGNORE",$string) .
I just searched this in Google and had a try.
from koel.
http://www.php.net/manual/en/function.iconv.php
here is the document of iconv.
from koel.
Strange. I've just tested in a Windows VM, the function works fine for me:
$file = new SplFileInfo("C:\Users\an\Desktop\中文好歌曲.mp3");
var_dump($file->getPathname()); // string(39) "C:\Users\an\Desktop\中文好歌曲.mp3"
from koel.
em......My test is not the same as yours.
maybe it's the Symfony/Finder 's problem? I'm not sure.
I add 3 songs, one english song, one korean song ,one chinese song.
require('vendor/autoload.php');
use Symfony\Component\Finder\Finder;
$finder = new Finder();
$finder->files()->in("D:\MusicBase");
foreach ($finder as $file) {
// Dump the absolute path
var_dump(iconv('GBK', 'UTF-8', $file->getRealpath())); // convert
var_dump($file->getRealpath()); //not convert
}
Below is what I see in chrome. chrome is using UTF-8 by default.
Forgive my ugly writings.
from koel.
Your sample doesn't work for me though. This appears to be a long-known issue with PHP – Unicode settings on Windows, which unfortunately I don't have enough time to look for a workaround now. I'd suggest you keep the current local fix if it works for you.
from koel.
Related Issues (20)
- /api/me error 500 HOT 4
- Add custom FFmpeg transcoding arguments HOT 1
- Scanning my Library with docker exec...php artisan koel:sync -v throws on some files errors like Atom at offset... HOT 2
- manifest.json 404 HOT 1
- Cannot change column 'id': used in a foreign key constraint 'koel/interactions_song_id_foreign' of table 'koel/interactions' HOT 4
- Music import fails with bad ID3 metadata HOT 4
- Log invalid files from sync HOT 1
- Artist art not loading / showing up HOT 7
- Interface not loading since 6.11.4 upgrade HOT 2
- Can't install - SQL errors HOT 2
- Unable to update profile / password information though web interface HOT 1
- Bulk editing song metadata clears track numbers
- PWA support for webUI HOT 3
- Init struggle
- Playlist sorting not being saved
- Visual bug: Green playlist buttons have lower height HOT 1
- General UX improvement ideas HOT 3
- Not Found: The requested content cannot be found. after using shareable URLs HOT 1
- Automatically scroll to the current playing song HOT 1
- Site not rendering after install HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from koel.