UTF-8 support

Announcements and description of general changes in kPlaylist

Postby aba » Tue Apr 01, 2008 9:49 am

jrudiman wrote:
aba wrote:Can you try with the latest build? 477. I've added some more checks there that might give you a clue.

Thanks Åge but i get the same results.
There are some more errors tough:
Code: Select all
Warning: Invalid argument supplied for foreach() in D:\xampplite\htdocs\kplaylist\getid3\module.tag.apetag.php on line 190

since this looks like an getid3 error, i've tried with beta version 1.7.8 (same results) and 2.0.0 (it is not detected, cannot be used). I'm not sure why this module is called though.

One thing I also tried is to disable completely the id3 support but again, the unicode filenames are skipped.

Let me know if i can try anything else.


You shouldent put:

cfg['filesystemcharset'] = 'UTF-8';

Probably it should be something like EUC-JP.
aba
Site Admin
 
Posts: 2325
Joined: Wed May 08, 2002 9:19 am

Postby aba » Tue Apr 01, 2008 9:55 am

aba wrote:
jrudiman wrote:
aba wrote:Can you try with the latest build? 477. I've added some more checks there that might give you a clue.

Thanks Åge but i get the same results.
There are some more errors tough:
Code: Select all
Warning: Invalid argument supplied for foreach() in D:\xampplite\htdocs\kplaylist\getid3\module.tag.apetag.php on line 190

since this looks like an getid3 error, i've tried with beta version 1.7.8 (same results) and 2.0.0 (it is not detected, cannot be used). I'm not sure why this module is called though.

One thing I also tried is to disable completely the id3 support but again, the unicode filenames are skipped.

Let me know if i can try anything else.




You should stick to 1.7.7 of getid3. Newer versions are not supported.

PS! .. I've read through your posts again, and i realized that you were talking about filemtime and filesize. If those are not working, there is not much kP can do. You just have to live without those files. kP is of course under PHP's control and if PHP can't read them, there is no way kP can read them. But I hope it works alright except that?
aba
Site Admin
 
Posts: 2325
Joined: Wed May 08, 2002 9:19 am

Postby jrudiman » Tue Apr 01, 2008 11:05 am

aba wrote:PS! .. I've read through your posts again, and i realized that you were talking about filemtime and filesize. If those are not working, there is not much kP can do. You just have to live without those files. kP is of course under PHP's control and if PHP can't read them, there is no way kP can read them. But I hope it works alright except that?

Yes, it looks like when fetching the files, asian characters are converted to interrogation marks and thus throwing that errors. I though php was unicode aware :)
I'll have to rename them to english characters. all other unicode stuff is working fine.
Thanks for your support though!
jrudiman
 
Posts: 9
Joined: Mon Mar 31, 2008 6:05 pm

Postby Killing Joke » Mon May 19, 2008 6:21 pm

"everything" works fine with UTF8 for me (i'm french) ... unless i try to download some UTF8 MP3 (with accentued characters in their file name) (through zip archiver) : the resulting zip file contains badly encoded character names !
I have :
$cfg['filesystemcharset'] = 'UTF-8';

And same behavior with :
$cfg['utf8mode']
set to true or false.

Right now i'm using v1.8 502

Moreover i have the same behavior on the "archive creator" pop up window => there for example i have :
"100% .. (xxxxxxx) - 12. Que du bô.mp3"
whereas the filename is "(xxxxxxx) - 12. Que du bô.mp3"
Killing Joke
 
Posts: 7
Joined: Sun May 20, 2007 12:00 pm

Postby aba » Mon May 19, 2008 6:28 pm

Killing Joke wrote:"everything" works fine with UTF8 for me (i'm french) ... unless i try to download some UTF8 MP3 (with accentued characters in their file name) (through zip archiver) : the resulting zip file contains badly encoded character names !
I have :
$cfg['filesystemcharset'] = 'UTF-8';

And same behavior with :
$cfg['utf8mode']
set to true or false.

Right now i'm using v1.8 502

Moreover i have the same behavior on the "archive creator" pop up window => there for example i have :
"100% .. (xxxxxxx) - 12. Que du bô.mp3"
whereas the filename is "(xxxxxxx) - 12. Que du bô.mp3"



Which archiver are you using? Did you try the zip inbuilt (requires PHP 5.2 or later.)
aba
Site Admin
 
Posts: 2325
Joined: Wed May 08, 2002 9:19 am

Postby Killing Joke » Mon May 19, 2008 6:29 pm

aba wrote:
Killing Joke wrote:"everything" works fine with UTF8 for me (i'm french) ... unless i try to download some UTF8 MP3 (with accentued characters in their file name) (through zip archiver) : the resulting zip file contains badly encoded character names !
I have :
$cfg['filesystemcharset'] = 'UTF-8';

And same behavior with :
$cfg['utf8mode']
set to true or false.

Right now i'm using v1.8 502

Moreover i have the same behavior on the "archive creator" pop up window => there for example i have :
"100% .. (xxxxxxx) - 12. Que du bô.mp3"
whereas the filename is "(xxxxxxx) - 12. Que du bô.mp3"



Which archiver are you using? Did you try the zip inbuilt (requires PHP 5.2 or later.)


I'm under Linux.
Right now i'm not using the inbuilt archiver, but the plain old "zip" command.
I don't know yet how to install the php_zip (.so) ? extension for the now ... looking for this (PECL ?).
Killing Joke
 
Posts: 7
Joined: Sun May 20, 2007 12:00 pm

Postby aba » Mon May 19, 2008 6:33 pm

Killing Joke wrote:Right now i'm not using the inbuilt archiver, but the plain old "zip" command.
I don't know yet how to install the php_zip (.so) ? extension for the now ... looking for this (PECL ?).


It's called zip.so and works with Linux and is normally included as a part of PHP (5.2.x)
aba
Site Admin
 
Posts: 2325
Joined: Wed May 08, 2002 9:19 am

Postby Killing Joke » Mon May 19, 2008 6:34 pm

Ok after "pecl install zip" and "extension=zip.so" in my php.ini, i can use the inbuilt zip archiver.
But the problem is still there.
Moreover the generated .zip has more folders in the folder structure (now i have "home" > "mp3" > "artist" > "album").

My "Info" tab is :
php5 Yes
getid3 Yes
iconv Yes
zip Yes
curl Yes
multibyte Yes
gd/image Yes
openssl Yes

memory_limit 256M
max_execution_time 86400
file_uploads 1
upload_max_filesize 2M
post_max_size 8M
allow_url_fopen 1
Killing Joke
 
Posts: 7
Joined: Sun May 20, 2007 12:00 pm

Postby aba » Mon May 19, 2008 6:48 pm

Killing Joke wrote:Ok after "pecl install zip" and "extension=zip.so" in my php.ini, i can use the inbuilt zip archiver.
But the problem is still there.
Moreover the generated .zip has more folders in the folder structure (now i have "home" > "mp3" > "artist" > "album").



That's normal (folders.). Seems like zip does not really handle unicode filenames very well. Information about this seems to be limited. :( You should try using tar instead. That should work and it is faster to generate (no compression).
aba
Site Admin
 
Posts: 2325
Joined: Wed May 08, 2002 9:19 am

Postby Killing Joke » Mon May 19, 2008 6:52 pm

aba wrote:
Killing Joke wrote:Ok after "pecl install zip" and "extension=zip.so" in my php.ini, i can use the inbuilt zip archiver.
But the problem is still there.
Moreover the generated .zip has more folders in the folder structure (now i have "home" > "mp3" > "artist" > "album").



That's normal (folders.). Seems like zip does not really handle unicode filenames very well. Information about this seems to be limited. :( You should try using tar instead. That should work and it is faster to generate (no compression).


Hey,
I've just tried tar : same problem !
I wonder if in fact a few encoding wouldn't be missing in kplaylist, coz' with archive debug on i get (for example with zip (not inbuild) archives) :
/usr/bin/zip -j -0 /var/tmp/kppackoWM8fX.zip "/home/mp3/xxxxx/(xxxxx) - Un jour de rêves/(xxxxx) - 01. Un jour de rêves.mp3"
/usr/bin/zip -j -0 /var/tmp/kppackoWM8fX.zip "/home/mp3/xxxxx/(xxxxx) - Un jour de rêves/(xxxxx) - 09. Sèche tes larmes.mp3"
(bad encoding in the filenames outputed)
Killing Joke
 
Posts: 7
Joined: Sun May 20, 2007 12:00 pm

Postby Killing Joke » Mon May 19, 2008 6:55 pm

Additionnal note :
with 1.7 464 (the previous version i was running), the problem was the same (bad filenames in the built zip), *but* the output in the "archive creator" pop up was ok ...
100% .. (xxxxx) - 09. Sèche tes larmes.mp3
Killing Joke
 
Posts: 7
Joined: Sun May 20, 2007 12:00 pm

Postby netguy » Sat Jul 05, 2008 11:10 am

My filename contains Chinese fonts. After I execute "update", the filename saved in MySQL remains un-encoded. Why?

Although there is tiny problem above, windows media player can play it well. I have a silly question for my own php:

<?
header('Content-Type: audio/x-mpegurl');
?>
#EXTM3U
1<unicode>.mp3
2 2.mp3

I write directly the filenames into this PHP, but the first file which contains unicoded characters is skipped by WMP. Why?

Thanks in advance.
netguy
 
Posts: 2
Joined: Sat Jul 05, 2008 10:52 am

Postby netguy » Sat Jul 05, 2008 1:21 pm

netguy wrote:#EXTM3U
1<unicode>.mp3
2 2.mp3

I write directly the filenames into this PHP, but the first file which contains unicoded characters is skipped by WMP. Why?

I can answer it myself now, it is so simple:
before sending the data, use iconv to encode the file names.
netguy
 
Posts: 2
Joined: Sat Jul 05, 2008 10:52 am

Re: UTF-8 support

Postby lclaude » Wed Nov 19, 2008 12:57 am

hello,
i have the same problem than Killing Joke (9 post before), and i'm French so :
"everything works fine with utf-8 ... unless with in tar (with accentued caracters)"

I use the custom utf-8 script v1.8.502
my conf is :
$cfg['convertcharset'] = true;
$cfg['filesystemcharset'] = 'ISO-8859-1';

My server is :
Linux, Apache, php 5.1.6,
php5 yes
getid3 yes
iconv yes
zip no
curl yes
multibyte yes
gd/image yes
openssl yes

please help !
Laurent
lclaude
 
Posts: 3
Joined: Thu Sep 11, 2008 2:30 pm

Previous

Return to Announcement



cron