UTF-8 support

Announcements and description of general changes in kPlaylist

Postby tcghost » Sun Jun 03, 2007 11:48 pm

I did a full update with rebuild. I tried the virtualdir option as well, still nothing.
tcghost
 
Posts: 229
Joined: Fri Nov 04, 2005 6:48 pm
Location: Florida

Postby tcghost » Mon Jun 04, 2007 4:48 am

I have the following 2 settings set, maybe it will help:
Code: Select all
$cfg['convertcharset'] = true;
$cfg['filesystemcharset'] = 'CP1251';


Also, rss feeds still are ISO-8859-1 encoded...
Code: Select all
      $this->data  = '<?xml version="1.0" encoding="ISO-8859-1"?>'.$this->lf;
tcghost
 
Posts: 229
Joined: Fri Nov 04, 2005 6:48 pm
Location: Florida

Postby aba » Mon Jun 04, 2007 5:49 pm

tcghost wrote:I have the following 2 settings set, maybe it will help:
Code: Select all
$cfg['convertcharset'] = true;
$cfg['filesystemcharset'] = 'CP1251';


Also, rss feeds still are ISO-8859-1 encoded...
Code: Select all
      $this->data  = '<?xml version="1.0" encoding="ISO-8859-1"?>'.$this->lf;


Replace your

Code: Select all
function search_qupdorins($id, $finf, $filein, $md5, $drive, $mtime, $f_stat, $fsize)


With this:

Code: Select all

function search_qupdorins($id, $finf, $filein, $md5, $drive, $mtime, $f_stat, $fsize)
{
   if (UTF8MODE)
   {
      $utf_filein = iconv('', 'UTF-8', $filein);
      $utf_filein = $utf_filein ? $utf_filein : $filein;
   } else $utf_filein = $free;
   
   if ($id > 0) $sql = 'UPDATE '; else $sql = 'INSERT INTO ';
   
   $sql .= TBL_SEARCH.' SET title = "'.myescstr($finf['title']).'", fname = "'.myescstr(kp_basename($filein)).'", fpath = "'.myescstr(getrelative($filein)).'", album = "'.myescstr($finf['album']).'", artist = "'.myescstr($finf['artist']).'", md5 = "'.$md5.'", free = "'.myescstr(kp_basename($utf_filein)).'", genre = '. vernumset($finf['genre'],255).', lengths = '.$finf['lengths'].', ratemode = '.$finf['ratemode'].', bitrate = '.(int)$finf['bitrate'].', drive = '.$drive.', mtime = '.$mtime.', dirname = "'.myescstr(getrelative($utf_filein)).'", f_stat = '.$f_stat.', fsize = '.$fsize.', track = '.$finf['track'].', `year` = '.$finf['year'].', comment = "'.myescstr($finf['comment']).'", ftypeid = '.$finf['ftypeid'].', id3image = '.$finf['id3image'];
   if ($id > 0) $sql .= ' WHERE id = '.$id; else $sql .= ', `date` = '.$mtime;
   
   return $sql;
}


And then run update with id3 rebuild enabled and see if it helps.
aba
Site Admin
 
Posts: 2325
Joined: Wed May 08, 2002 9:19 am

Postby tcghost » Mon Jun 04, 2007 8:14 pm

wow, that fixed it! thank you again for all your help!

the only issue left that I see is that the update window still displays non-ansi characters in filenames as squares, but that's minor and barely noticable.

Oh, just noticed one more thing: when I'm 2 directories deep and click on the "go one directory up" link, it takes me to the root. the url it takes me to is:
kp451c.php?pwd=y+Xt6O3j8ODkLw==&d=0
when the url it should be is:
kp451c.php?n3=163_-677857309&pwd=&d=0
tcghost
 
Posts: 229
Joined: Fri Nov 04, 2005 6:48 pm
Location: Florida

Postby aba » Mon Jun 04, 2007 10:57 pm

tcghost wrote:wow, that fixed it! thank you again for all your help!

the only issue left that I see is that the update window still displays non-ansi characters in filenames as squares, but that's minor and barely noticable.

Oh, just noticed one more thing: when I'm 2 directories deep and click on the "go one directory up" link, it takes me to the root. the url it takes me to is:
kp451c.php?pwd=y+Xt6O3j8ODkLw==&d=0
when the url it should be is:
kp451c.php?n3=163_-677857309&pwd=&d=0


Get 452, this bug should be corrected. (The issue with the update display is not though.)
aba
Site Admin
 
Posts: 2325
Joined: Wed May 08, 2002 9:19 am

Unreadable

Postby emz » Tue Jun 05, 2007 1:25 pm

I have downloaded version 1.7 453 and i've updated my old one. Everything is working , but.. i see the bulletin in an unknown language. I don't think it's language at all. It's unreadable. It have to be in Bulgarian. The version is with UTF-8 default encoding. Everything else is readable.
emz
 
Posts: 16
Joined: Wed May 23, 2007 2:35 pm
Location: Bulgaria, Varna

Re: Unreadable

Postby aba » Tue Jun 05, 2007 2:43 pm

emz wrote:I have downloaded version 1.7 453 and i've updated my old one. Everything is working , but.. i see the bulletin in an unknown language. I don't think it's language at all. It's unreadable. It have to be in Bulgarian. The version is with UTF-8 default encoding. Everything else is readable.


Did you run:

ALTER TABLE `tbl_bulletin` CHANGE `mesg` `mesg` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ;

?

These SQL's in this thread will automatically be run in a automatic upgrade in the future, but for now..
aba
Site Admin
 
Posts: 2325
Joined: Wed May 08, 2002 9:19 am

Postby tcghost » Fri Jun 08, 2007 4:46 pm

got another problem:
the playlists entries are displayed as weird characters. I'm guessing it's because the id3 entries are unicode and the playlists have to be ansi, and the entries are not converted. I also heard about a new playlist format m3u8 that supports unicode, any chance that it can be implemented?

Thank you again for all your work on unicode support!
tcghost
 
Posts: 229
Joined: Fri Nov 04, 2005 6:48 pm
Location: Florida

Postby tcghost » Mon Jun 11, 2007 3:20 pm

tcghost wrote:got another problem:
the playlists entries are displayed as weird characters. I'm guessing it's because the id3 entries are unicode and the playlists have to be ansi, and the entries are not converted. I also heard about a new playlist format m3u8 that supports unicode, any chance that it can be implemented?

Thank you again for all your work on unicode support!


I don't know how or why, but it seems it fixed itself! :)
tcghost
 
Posts: 229
Joined: Fri Nov 04, 2005 6:48 pm
Location: Florida

Postby tcghost » Thu Jun 14, 2007 5:24 pm

ok, I figured it out... wmp just wasn't displaying the entry name for m3u playlists. I had to do the following to get it to display correctly:

in file.php, search for:
Code: Select all
      return $this->crlf.'#EXTINF:'.$lengths.','.$name;

and replace with:
Code: Select all
      return $this->crlf.'#EXTINF:'.$lengths.','.@iconv('UTF-8', 'CP1251', $name);


search for:
Code: Select all
               $this->data .= '<TITLE>'.$f2->gentitle(array('track', 'title', 'album', 'artist')).'</TITLE>'.$this->crlf;

and replace with:
Code: Select all
               $this->data .= '<TITLE>'.@iconv('UTF-8', 'CP1251', $f2->gentitle(array('track', 'title', 'album', 'artist'))).'</TITLE>'.$this->crlf;


I'll try duplicating the m3ugen class and implementing the m3u8 playlists
tcghost
 
Posts: 229
Joined: Fri Nov 04, 2005 6:48 pm
Location: Florida

Postby jrudiman » Mon Mar 31, 2008 6:33 pm

Hello,
I recently installed kplaylist utf8 version (from "customize").

All descriptions (id3) are displayed correctly (asian languages in my case). This happen with non-asian filenames. However, files unicode filenames, they are not even considered when "updating". I get this errors:

Code: Select all
Warning: filesize() [function.filesize]: stat failed for E://Music/?�?????? - ????.mp3 in D:\xampplite\htdocs\kplaylist\index.php on line 8790

Warning: filemtime() [function.filemtime]: stat failed for E://Music/?�?????? - ????.mp3 in D:\xampplite\htdocs\kplaylist\index.php on line 8791
Could not determine this file: E://Music/?�?????? - ????.mp3, skipped.


These 2 linecodes are from function "search_updatelist":

Code: Select all
$fsize = filesize($file);
$mtime = filemtime($file);


Do you know what could be wrong?
jrudiman
 
Posts: 9
Joined: Mon Mar 31, 2008 6:05 pm

Postby aba » Mon Mar 31, 2008 7:02 pm

jrudiman wrote:Hello,
I recently installed kplaylist utf8 version (from "customize").

All descriptions (id3) are displayed correctly (asian languages in my case). This happen with non-asian filenames. However, files unicode filenames, they are not even considered when "updating". I get this errors:

Code: Select all
Warning: filesize() [function.filesize]: stat failed for E://Music/?�?????? - ????.mp3 in D:\xampplite\htdocs\kplaylist\index.php on line 8790

Warning: filemtime() [function.filemtime]: stat failed for E://Music/?�?????? - ????.mp3 in D:\xampplite\htdocs\kplaylist\index.php on line 8791
Could not determine this file: E://Music/?�?????? - ????.mp3, skipped.


These 2 linecodes are from function "search_updatelist":

Code: Select all
$fsize = filesize($file);
$mtime = filemtime($file);


Do you know what could be wrong?


Two things:

1. You need getid3 (1.7).

2. Look at:

$cfg['convertcharset']

$cfg['filesystemcharset']

in the script.

Åge
aba
Site Admin
 
Posts: 2325
Joined: Wed May 08, 2002 9:19 am

Postby jrudiman » Mon Mar 31, 2008 8:25 pm

aba wrote:Two things:

1. You need getid3 (1.7).

2. Look at:

$cfg['convertcharset']

$cfg['filesystemcharset']

in the script.

Åge


Hi Åge,

I have getid3 1.7.7 and
Code: Select all
$cfg['convertcharset'] = true;
$cfg['filesystemcharset'] = 'UTF-8';
$cfg['utf8mode'] = true;


In fact, if i rename these japanese filenames to english filenames, they are displayed and shows the correct japanese ID3 tags. All the unicode stuff seems to be working fine except for unicode filenames.[/code]

Any clue?
jrudiman
 
Posts: 9
Joined: Mon Mar 31, 2008 6:05 pm

Postby aba » Tue Apr 01, 2008 12:37 am

jrudiman wrote:
aba wrote:Two things:

1. You need getid3 (1.7).

2. Look at:

$cfg['convertcharset']

$cfg['filesystemcharset']

in the script.

Åge


Hi Åge,

I have getid3 1.7.7 and
Code: Select all
$cfg['convertcharset'] = true;
$cfg['filesystemcharset'] = 'UTF-8';
$cfg['utf8mode'] = true;


In fact, if i rename these japanese filenames to english filenames, they are displayed and shows the correct japanese ID3 tags. All the unicode stuff seems to be working fine except for unicode filenames.[/code]

Any clue?


Can you try with the latest build? 477. I've added some more checks there that might give you a clue.
aba
Site Admin
 
Posts: 2325
Joined: Wed May 08, 2002 9:19 am

Postby jrudiman » Tue Apr 01, 2008 9:35 am

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.
jrudiman
 
Posts: 9
Joined: Mon Mar 31, 2008 6:05 pm

PreviousNext

Return to Announcement



cron