OK I think I found the problem and I definitely need some help here.
It's in the script
select USER_ID,FORUM_PERMISSIONS,SITE_PERMISSIONS,CP_PERMISSIONS
from ubbt_CACHED_PERMISSIONS
where USER_ID = 2
Here's what that one of that result looks like -
'a:23:{s:8:\"USE_HTML\";a:25:{i:10;s:1:\"1\";i:11;s:1:\"1\";i:12;s:1:\"1\";i:13;s:1:\"1\";i:14;s:1:\"1\";i:15;s:1:\"1\";i:16;s:1:\"1\";i:17;s:1:\"1\";i:18;s:1:\"1\";i:19;s:1:\"1\";i:20;s:1:\"1\";i:24;s:1:\"1\";i:25;s:1:\"1\";i:26;s:1:\"1\";i:29;s:1:\"1\";i:31;s:1:\"1\";i:32;s:1:\"1\";i:33;s:1:\"1\";s:11:\"33©_forum=0\";s:1:\"1\";i:35;s:1:\"1\";i:36;s:1:\"1\";i:5;s:1:\"1\";i:6;s:1:\"1\";i:7;s:1:\"1\";i:8;s:1:\"1\";}
Note the copyright symbol in the middle of 33(c)_forum=0
Is that really what should be there? It's apparently that mark that is screwing up things once I try to use UTF8 as my language, since it's having problems with it.