Gossamer Forum
Home : Products : Gossamer Links : Discussions :

importing unicode

Quote Reply
importing unicode
On a fresh install of Glinks, I've been experimenting with importing data as utf-8. I was able to create a link, export it to a file, and re-import it into the system as a regular text file. At first, there was an error message about the 'Free Link Expired' field not containing a value, but it went away after I stuck a 1 in that field. Then, using Wordpad, I tried saving the text file as Unicode, FTPing it up (Binary and ASCII) to the admin folder and importing, but it doesn't work. It says something about the Category ID column not being found. Any ideas? I have a very simple set of 2000 links (just URL, NAME, DESCRIPTION, CATEGORY) I would like to import but there are always a ton of special characters and it would be nice not to worry about representing them with html entities.

best!
squillo
Quote Reply
Re: [squillo] importing unicode In reply to
Are you going to encode your html templates as utf-8 or leave them as they are?
Quote Reply
Re: [Alba] importing unicode In reply to
I was going to change the templates over to utf-8 as well - the whole enchilada!
Quote Reply
Re: [squillo] importing unicode In reply to
Ok, I've chased this down the rabbit hole a little further. Like many MySQL installations, my host sets it up to store the data in latin1, not utf-8, and it does not appear to be something I can easily change. However, that shouldn't matter. I have another site running in Japanese with utf-8 and the only thing necessary to make it work was making sure the administrative pages where text is entered has a charset set to utf-8, and of course, that the front-end pages are also set to utf-8.

In Glinks, I see that if I set the encoding to utf-8 before pasting text with special characters into the import form manually, it somehow gets represented properly in the database and the resultant user page displays correctly if set to utf-8. The file import version still does not work (because of the MySQL character setting above?), but I can live with that. The question I have is: If you wanted to add a charset to all the pages of the admin panel, how would you do it? Currently, I see no charset defined in the header of those pages, though it does appear quite easy to do on the front end.

best!
squillo