Welcome to Geeklog Wednesday, November 22 2017 @ 01:46 pm EST


Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
Quote by: samstone

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....

Status: offline

jmucchiello

Forum User
Full Member
Registered: 29/08/2005
Posts: 985
Does this issue occur with newly made stories or just old stories or both?

Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
Quote by: jmucchiello

Does this issue occur with newly made stories or just old stories or both?


Both

Status: offline

samstone

Forum User
Full Member
Registered: 29/09/2002
Posts: 820
It seems that you are using MS SQL. I have not experience with that. I was talking abou MySQL.

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


Status: offline

samstone

Forum User
Full Member
Registered: 29/09/2002
Posts: 820
One encouragement is that you won't have this problem from now on, as starting from 1.4.1, you can create pure utf-8 websites with GL.

Peace!

Sam

Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
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...

Status: offline

mevans

Forum User
Full Member
Registered: 08/02/2004
Posts: 393
Location:Texas
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 Smile ). Not sure if this will help you out or not, but it might be worth a look.

Thanks!
Mark

Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
Quote by: mevans

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 Smile ). 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...

PHP Formatted Code
$_CONF['language']        = 'english_utf-8';
$_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




Status: offline

mevans

Forum User
Full Member
Registered: 08/02/2004
Posts: 393
Location:Texas
There are only Unicode languge profiles no non unicode profiles,
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

Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
Quote by: mevans

There are only Unicode languge profiles no non unicode profiles,
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....


Status: offline

samstone

Forum User
Full Member
Registered: 29/09/2002
Posts: 820
Quote by: trampoline

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



Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
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.


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 ???

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/2005
Posts: 1240
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
One of the Geeklog Core Developers.

Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
Quote by: Laugh

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..

Status: offline

samstone

Forum User
Full Member
Registered: 29/09/2002
Posts: 820
Please read my postings. I have repeated this a couple of times.

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







Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
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...

Status: offline

samstone

Forum User
Full Member
Registered: 29/09/2002
Posts: 820
Quote by: trampoline

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




Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
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 ???

Status: offline

samstone

Forum User
Full Member
Registered: 29/09/2002
Posts: 820
Quote by: 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

Status: offline

trampoline

Forum User
Full Member
Registered: 24/02/2006
Posts: 392
Quote by: samstone

Quote by: 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...

All times are EST. The time is now 01:46 pm.

  • 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