Character error with SQL
#1
Is there something that can be done about this:

2020-01-18 00:32:42.222 T:9472   ERROR: SQL: [MyMusic72] Undefined MySQL error: Code (1366)
Query: INSERT INTO song (idSong,idAlbum,idPath,strArtistDisp,strTitle,iTrack,iDuration,iYear,strFileName,strMusicBrainzTrackID, strArtistSort, iTimesPlayed,iStartOffset, iEndOffset,lastplayed,rating,userrating,votes,comment,mood,strReplayGain) values (NULL, 19835, 81974, 'Kate Bush', '𝜋', 65538, 369, 2005, '1.02 - 𝜋.flac','c1983e4d-cc94-4f11-9716-8fc7851494cc',NULL,0,0,0,NULL, 0.0, 0, 0,'Toshiba-EMI Limited TOCP-66474', '', '-2.700,1.000,-2.380,1.000')
2020-01-18 00:32:42.223 T:9472 ERROR: musicdatabase:unable to addsong (INSERT INTO song (idSong,idAlbum,idPath,strArtistDisp,strTitle,iTrack,iDuration,iYear,strFileName,strMusicBrainzTrackID, strArtistSort, iTimesPlayed,iStartOffset, iEndOffset,lastplayed,rating,userrating,votes,comment,mood,strReplayGain) values (NULL, 19835, 81974, 'Kate Bush', '𝜋', 65538, 369, 2005, '1.02 - 𝜋.flac','c1983e4d-cc94-4f11-9716-8fc7851494cc',NULL,0,0,0,NULL, 0.0, 0, 0,'Toshiba-EMI Limited TOCP-66474', '', '-2.700,1.000,-2.380,1.000'))

Is the problem the character in the filename?
Reply
#2
Fwiw... MySQL code/error 1366 refers to:
Code:
Error: 1366 SQLSTATE: HY000 (ER_TRUNCATED_WRONG_VALUE_FOR_FIELD)
Message: Incorrect %s value: '%s' for column '%s' at row %ld
so I'm guessing the Pi sign is the troublemaker here.

Which MySQL/MariaDB server are you using? And OS? (A full debug log (wiki) is always handy...)
What is the default character set and collation of your server?
Got a Kodi problem? Provide us with a full Debug log (wiki) || Usefull pages: First time user (wiki) || Troubleshooting (wiki) || Free content (wiki) || Forum rules (wiki) || VPN policy (wiki)
Reply
#3
@HeresJohnny My guess would be that it's the filename yes.  Reason being, I have the exact same track in my MySQL database but the filename is 1-02_.mp3 .  The track name is correctly shown as 𝜋.
Learning Linux the hard way !!
Reply
#4
(2020-01-18, 07:59)Klojum Wrote: Which MySQL/MariaDB server are you using? And OS?
What is the default character set and collation of your server?

MariaDB 10.4 on Windows 10, collation is utf_general_ci.
Reply



Logout Mark Read Team Forum Stats Members Help
Character error with SQL0
This forum uses Lukasz Tkacz MyBB addons.