Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 07:02 am EST
Geeklog Forums
Unicode
Page navigation
trampoline
As far as I remember from my experience, you didn't change anything. The pre GL 1.4.1 works with Unicode fine with the none Unicode collation. Don't ask me why . Starting with 1.4.1b2 the developers did something to make GL more Unicode compatible, which somehow made it stop working with none-unicode tables.
Well, I remember those nightmare days. Depending on the sites I had, for some sites I had to change every table one by one to Unicode collation; took a lot of patience. For others, I just recreated new databases with Unicode from scratch.
Again, another potential problem is, depending on the way your server is configured. GL installation might still create Swedish collation on the tables at installation. You have to edit my.conf to make the new databases and tables created automatically in Unicode. In my case, that broke some older sites, so I had to reverse it. I think PHP5 and MySQL5 would not have this problem because they can be purely utf-8. I have PHP5, but dare not yet upgrade to MySQL5 worrying that some sites might be affected, but I might do it when I can afford some unforeseen down time.
In any case, the easiest method is to change the table collations one by one. For instant solution, just change the story table to utf-8.
Hope this helps!
Sam
Well Stupidly I actually upgraed to 1.4.1b as I thought Unicode support would be better, I naturally assumed with a unicode databse and unicode set as the language that the site would be unicode compatible......
As you pointed out I do indeed have swedish collation under a unicode database and I have tried changing the gl_stories table in one go to unicode, it changes fine still works but the site still does not accept Unicode for stories... So what am I doing wrong ???
Thanks for any pointers....
jmucchiello
trampoline
Does this issue occur with newly made stories or just old stories or both?
Both
samstone
A fresh installation is much easier than trying to find out how and where to fix it, since I don't know how you site and database is set up.
I would recommend that you back up your database, and also make another backup without the tables but only data, create a new database with utf8_general_ci, run a fresh installation using GL.1.4.1. and insert the backup data to the new database. That will give you a clean utf-8 site.
The problem with this is that you might not be able to insert the data if the fields are different (e.g. if you have some plugins previously, you might have to install the pulgins first before you upload the data). You can also migrate the data filed by field to avoid conflict. I have been there and done that, and I can tell you that there is not easy way. As long as you keep a backup database, you can try different ways until it works.
If you want pure utf-8, also configure the my.conf and php.ini to use utf-8. The reason I mentioned MySQL5 is because it creates utf-8 tables by default, paring with PHP5, it is more international friendly, but that's another subject.
Peace!
Sam
trampoline
I actually did install the whole site again at 1.4.1 as I thought it was Unicode Compliant, I deleted the old site Now the site is large and I cannot do that so
I absolutely have to make this Unicode compatible...
So you think if I create a new database and put the data back into it is will work ??? at least it is worth a try.
The database is its self is unicode just the tables seem not to be...
mevans
Thanks!
Mark
trampoline
Here is an article I wrote on how I convert sites to UTF-8. The tools I reference are Windows based, but I'm willing to bet you can find OS X versions too (you could even update the wiki entry with the OS X tools if you like ). Not sure if this will help you out or not, but it might be worth a look.
Thanks!
Mark
Thanks Mark I will try that.. I now have a busy site so it may not be so easy..
in config.php
it looks like this and has done sice I created the site...
$_CONF['default_charset'] = 'utf-8';
There are only Unicode languge profiles no non unicode profiles,
the database is Unicode but the tables are not...
The server system is
OS X 10.4.11
apache 1.3.33
SQL 4.1.22
php 5
mevans
the database is Unicode but the tables are not...
I think this is where the problem exists. If you can dump the tables, edit the charset per the article and then run them through iconv and then reload, life should be good.
Good luck!
Mark
trampoline
the database is Unicode but the tables are not...
I think this is where the problem exists. If you can dump the tables, edit the charset per the article and then run them through iconv and then reload, life should be good.
Good luck!
Mark
OK I will try sounds a bit scarry !!!!
I'll have to find the things in OS X to do it will post back on progress if any .....
I actually converted a table to UTF8 with SQL Administrator so surely new articles would be Unicode compliant ?
I am just wondring if there is more to this than just the database as I have set the stories database to Unicode and new stories do not come out right.
I am sorry I am very very slow....
samstone
I am using MYSQL on a Mac OS X server.
I actually did install the whole site again at 1.4.1 as I thought it was Unicode Compliant, I deleted the old site Now the site is large and I cannot do that so
I absolutely have to make this Unicode compatible...
So you think if I create a new database and put the data back into it is will work ??? at least it is worth a try.
The database is its self is unicode just the tables seem not to be...
Upgrading to 1.4.1 does not automatically change the table collation. You need a clean installation and before you hit install, you need to create a database with utf8_general_ci collation.
What's your MySQL version? Is it version 4.*? If it is and If I remember it right, you will still end up with the tables created in sweedish_general_ci upon installation, if you don't edit the my.conf to tell it to use utf-8.
You can try Mark's method. I did, but didn't work for my situation because there were other problems with my database fields that I had to correct manually, and I don't quite understand the iconv part which took a long time to execute.
Good luck!
Sam
trampoline
What's your MySQL version? Is it version 4.*? If it is and If I remember it right, you will still end up with the tables created in sweedish_general_ci upon installation, if you don't edit the my.conf to tell it to use utf-8.
You can try Mark's method. I did, but didn't work for my situation because there were other problems with my database fields that I had to correct manually, and I don't quite understand the iconv part which took a long time to execute.
I deleted the old database created a new one which was utf8_general_ci
hen installed Geeklog but as you correctly pointed out even though I set the config.php to use utf-8 my tables are infact sweedish_general_ci
So it looks like have the same problem...
What manual things did you do to put it right ???
trampoline
Keep posting your results, this is something I a am going to have to do soon and I can see myself running into similar problems.
Thanks
Tom
I will but it will be a while possibly as I actually fell quite at sea with this...
So i will post back when I get some result..
samstone
You can do three things,
1) After the initial installation you can change collations of the tables and fields manually one by one.
2) Set the my.conf for the MySQL to create tables in UTF-8 by default before installation. This way you don't have to change the collations one by one. However, this requires that you have access to the server root to edit the my.conf. If your site is hosted by someone else, you are not likely be given the rights to do that. If you have access to my.conf, the following is my setting:
[mysqld]
set-variable = max_connections=500
safe-show-database
character-set-server=utf8
[client]
default-character-set=utf8
or
3) Upgrade to MySQL5 and PHP5. Again this requires that you own the server. If you are on a hosted site, transfer to another host that provide MySQL5 and PHP5 with UTF-8 set as default.
Peace!
Sam
trampoline
I asked a question...
I run my server and could upgrade SQL to 5 possibly..
I have php5 already and have had for a long time...
Your point 3
Just by upgrading to sql 5 will this actually resolve the issue ?
Your poit 2
my.conf ... is this the sql conf file ?
I will alter it as suggested I assume this is OK to do with sql 4 ?
Your point 1
I did alter the gl_stories table manually do I need to do the field as well ??
I did not realise I will do that then...
samstone
Hi Sam I did see your post...
I asked a question...
I run my server and could upgrade SQL to 5 possibly..
I have php5 already and have had for a long time...
Your point 3
Just by upgrading to sql 5 will this actually resolve the issue ?
Your poit 2
my.conf ... is this the sql conf file ?
I will alter it as suggested I assume this is OK to do with sql 4 ?
Your point 1
I did alter the gl_stories table manually do I need to do the field as well ??
I did not realise I will do that then...
I haven't upgraded to SQL5 myself, but I read on their website that it works smoother with utf-8 than the v.4, in fact it's utf-8 by default as far as I remember what I read. I am about to upgrade when I can afford the unforseen downtime. Upgrading to it would solve the problem permanently.
Yes, my.conf is MySQL config file. It's usually in the /etc directory. This would my MySQL4 to use utf-8 by default. In my case when I changed it, it broke the other none utf-8 sites, so I had to revserse it back. What I did was I changed the my.conf and installed the GL, and changed the my.conf back after the GL installation so that others sites wouldn't be affected. Now I have upgraded all other sites, so I can keep this configuration. In your case, if you don't have other sites to worry about, you can keep this configuration for good.
Yes, you need to change the collations of the fields or it wouldn't take effect. But, since you have access to my.conf, I would just delete the current database and reinstall it with a new my.conf setting so that they will automatically be set to utf-8.
Peace!
Sam
trampoline
Then add the code you suggest into my.conf
then import the data again into the new database that will just sort it all out ???
samstone
So If I delete the database (I guess after saving it)
Then add the code you suggest into my.conf
then import the data again into the new database that will just sort it all out ???
After the second step you need to install GL, which will create the tables and fields in utf-8.
Then import the data, but by data it must only be the data, not including the table structure because if you import the tables and fields along with data, it will replace the new tables and fields and you are back to square 1.
Peace!
Sam
trampoline
So If I delete the database (I guess after saving it)
Then add the code you suggest into my.conf
then import the data again into the new database that will just sort it all out ???
After the second step you need to install GL, which will create the tables and fields in utf-8.
Then import the data, but by data it must only be the data, not including the table structure because if you import the tables and fields along with data, it will replace the new tables and fields and you are back to square 1.
Peace!
Sam
I think I am unfamiliar with how to export just data, how do you do that ?
I have SQL Administrator but that is it...
Page navigation
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content