Phil Meyer;146796 Wrote: 
> 
> Should there be something in the CREATE TABLE statements to force the
> correct character encodings?
The reason that I don't do it in the CREATE TABLE statement is that I
wan't it to also work on 6.5.0 which don't have the collate part.


Phil Meyer;146796 Wrote: 
> If I look at the table properties for the track_history table after it
> is created, it has charset=utf8, collation=utf8_unicode_ci.  All
> char/varchar column properties seem to have the same charset and
> collation.  I checked the albums and tracks tables, and they have the
> same settings.
This is what a "SHOW CREATE TABLE tracks" and "SHOW CREATE TABLE
track_statistics" looks like on my working setup.

Code:
--------------------
    
  CREATE TABLE `tracks` (
  `id` int(10) unsigned NOT NULL auto_increment,
  `url` text collate utf8_unicode_ci NOT NULL,
  `title` blob,
  `titlesort` text collate utf8_unicode_ci,
  `titlesearch` text collate utf8_unicode_ci,
  `customsearch` text collate utf8_unicode_ci,
  `album` int(10) unsigned default NULL,
  `tracknum` int(10) unsigned default NULL,
  `content_type` varchar(255) collate utf8_unicode_ci default NULL,
  `timestamp` int(10) unsigned default NULL,
  `filesize` int(10) unsigned default NULL,
  `audio_size` int(10) unsigned default NULL,
  `audio_offset` int(10) unsigned default NULL,
  `year` smallint(5) unsigned default NULL,
  `secs` float unsigned default NULL,
  `cover` blob,
  `thumb` blob,
  `vbr_scale` varchar(255) collate utf8_unicode_ci default NULL,
  `bitrate` float unsigned default NULL,
  `samplerate` int(10) unsigned default NULL,
  `samplesize` int(10) unsigned default NULL,
  `channels` tinyint(1) unsigned default NULL,
  `block_alignment` int(10) unsigned default NULL,
  `endian` tinyint(1) default NULL,
  `bpm` smallint(5) unsigned default NULL,
  `tagversion` varchar(255) collate utf8_unicode_ci default NULL,
  `drm` tinyint(1) default NULL,
  `rating` tinyint(1) unsigned default NULL,
  `disc` tinyint(1) unsigned default NULL,
  `playCount` int(10) unsigned default NULL,
  `lastPlayed` int(10) unsigned default NULL,
  `audio` tinyint(1) default NULL,
  `remote` tinyint(1) default NULL,
  `lossless` tinyint(1) default NULL,
  `lyrics` text collate utf8_unicode_ci,
  `moodlogic_id` int(10) unsigned default NULL,
  `moodlogic_mixable` tinyint(1) default NULL,
  `musicbrainz_id` varchar(40) collate utf8_unicode_ci default NULL,
  `musicmagic_mixable` tinyint(1) default NULL,
  `replay_gain` float default NULL,
  `replay_peak` float default NULL,
  PRIMARY KEY  (`id`),
  KEY `trackTitleIndex` (`title`(255)),
  KEY `trackAlbumIndex` (`album`),
  KEY `ctSortIndex` (`content_type`),
  KEY `trackSortIndex` (`titlesort`(255)),
  KEY `trackSearchIndex` (`titlesearch`(255)),
  KEY `trackCustomSearchIndex` (`customsearch`(255)),
  KEY `trackBitrateIndex` (`bitrate`),
  KEY `trackDiscIndex` (`disc`),
  KEY `trackFilesizeIndex` (`filesize`),
  KEY `trackTimestampIndex` (`timestamp`),
  KEY `trackTracknumIndex` (`tracknum`),
  KEY `trackRatingIndex` (`rating`),
  KEY `trackPlayCountIndex` (`playCount`),
  KEY `trackLastPlayedIndex` (`lastPlayed`),
  KEY `trackAudioIndex` (`audio`),
  KEY `trackLyricsIndex` (`lyrics`(255)),
  KEY `trackRemoteIndex` (`remote`),
  KEY `trackLosslessIndex` (`lossless`),
  KEY `urlIndex` (`url`(255)),
  KEY `trackStatMBIndex` (`musicbrainz_id`),
  CONSTRAINT `tracks_ibfk_1` FOREIGN KEY (`album`) REFERENCES `albums` (`id`) 
ON DELETE CASCADE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
  
  CREATE TABLE `track_statistics` (
  `url` varchar(255) collate utf8_unicode_ci NOT NULL,
  `musicbrainz_id` varchar(40) collate utf8_unicode_ci default NULL,
  `playCount` int(10) unsigned default NULL,
  `added` int(10) unsigned default NULL,
  `lastPlayed` int(10) unsigned default NULL,
  `rating` int(10) unsigned default NULL,
  KEY `urlIndex` (`url`),
  KEY `musicbrainzIndex` (`musicbrainz_id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci
  
--------------------

If I understand you correctly this is also what you are seeing ?
I think the important thing is that the "url" columns have the same
collate in both tables.

Are you using the MySQL database delivered with slimserver or are you
using an external MySQL database ?

What operating system are you running slimserver on ?


-- 
erland

Erland Isaksson
'My homepage' (http://erland.homeip.net) 'My download page'
(http://erland.homeip.net/download)
(Developer of 'TrackStat'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-trackstat)
, 'SQLPlayList'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-sqlplaylist)
, 'DynamicPlayList'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-dynamicplaylist),
'Custom Browse'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-custombrowse)
and 'RandomPlayList'
(http://erland.homeip.net/download/do/viewapplication?name=slimserver-randomplaylist)
plugins)
------------------------------------------------------------------------
erland's Profile: http://forums.slimdevices.com/member.php?userid=3124
View this thread: http://forums.slimdevices.com/showthread.php?t=28653

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/plugins

Reply via email to