<div dir="ltr">The best reference I've found for confirmed UTF8 setup is referenced by the main INSTALL document:<br><div style="margin-left: 40px;"><a href="http://wiki.koha.org/doku.php?id=encodingscratchpad" target="_top" rel="nofollow"><span>http://wiki.<b class="highlight">koha</b>.org/doku.php?id=<b class="highlight">encodingscratchpad</b></span></a><br>
</div><br>HS, you need to consider that there are encodings set for Database, Table, AND Session. So even if you successfully loaded the tables and DB as UTF8, if your session is latin1, then you won't be able to view all data in the DB. Make sure you check the "SHOW VARIABLES..." as the user that will be connecting when Apache is accessed.<br>
<br>--joe<br><div><br><div class="gmail_quote">On Tue, Oct 7, 2008 at 11:36 AM, H.S. <span dir="ltr"><<a href="mailto:hs.samix@gmail.com">hs.samix@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
H.S. wrote:<br>
> H. S. wrote:<br>
>> In mysql that i have, I get this:<br>
>><br>
>> mysql> SHOW VARIABLES LIKE 'character\_set\_%';<br>
>> +--------------------------+--------+<br>
>> | Variable_name | Value |<br>
>> +--------------------------+--------+<br>
>> | character_set_client | latin1 |<br>
>> | character_set_connection | latin1 |<br>
>> | character_set_database | latin1 |<br>
>> | character_set_filesystem | binary |<br>
>> | character_set_results | latin1 |<br>
>> | character_set_server | latin1 |<br>
>> | character_set_system | utf8 |<br>
>> +--------------------------+--------+<br>
>> 7 rows in set (0.00 sec)<br>
>><br>
>><br>
>> So even though my system is utf8, mysql databases are being created in<br>
>> latin1. Is my understanding correct?<br>
><br>
><br>
> Just found out that my koha database is in latin1 encoding:<br>
> mysql> SHOW CREATE DATABASE koha;<br>
> +----------+-----------------------------------------------------------------+<br>
> | Database | Create Database<br>
> |<br>
> +----------+-----------------------------------------------------------------+<br>
> | koha | CREATE DATABASE `koha` /*!40100 DEFAULT CHARACTER SET<br>
> latin1 */ |<br>
> +----------+-----------------------------------------------------------------+<br>
> 1 row in set (0.00 sec)<br>
> mysql><br>
<br>
So here is what I did. I made second installation of Koha for testing<br>
purposes (on different ports, obiously) so that I could keep this test<br>
installation separate from the original installation. The test<br>
installation has mysql database named koha_test and its associated mysql<br>
user and password.<br>
<br>
Next, I dumped my original koha database (which I know is in latin1, see<br>
above):<br>
$> mysqldump -uroot -p --opt --default-character-set=latin1<br>
--skip-set-charset koha > 20081006-koha-latin1.sql<br>
<br>
Next, I restored the dump to the test installation:<br>
$> mysql -uroot -pgsqdb514 koha_test < 20081006-koha-latin1.sql<br>
<br>
And tried importing a book with ISBN 8173802130 from a Z39.50 search.<br>
Since this test installation was a copy of the original, the result was<br>
as before. The title is shown in Opac as is shown in this picture:<br>
<a href="http://picasaweb.google.ca/hs.samix/Screenshots#5253043585127255666" target="_blank">http://picasaweb.google.ca/hs.samix/Screenshots#5253043585127255666</a><br>
<br>
<br>
Next, I tried to remake the test db supporting utf8. I converted my<br>
original koha db dump to utf8.<br>
<br>
$> iconv -f ISO-8859-1 -t UTF-8 20081006-koha-latin1.sql ><br>
20081006-koha-utf8.sql<br>
$> perl -pi -w -e 's/CHARSET=latin1/CHARSET=utf8/g;' 20081006-koha-utf8.sql<br>
<br>
Then I dropped and recreated the test db supporting utf8:<br>
$> mysql --user=root -p --execute="DROP DATABASE koha_test; CREATE<br>
DATABASE koha_test CHARACTER SET utf8 COLLATE utf8_unicode_ci;"<br>
Enter password:<br>
$><br>
<br>
And restored the utf8 db data:<br>
$> mysql -uroot -p koha_test < 20081006-koha-utf8.sql<br>
Enter password:<br>
$><br>
<br>
At this point, the name of the library (the header in Opac page), which<br>
was not in English, appears as a series of questions marks: ??????....<br>
<br>
So, something is not gone right.<br>
<br>
I then again searched and imported the book with ISBN 8173802130 and<br>
added this item. Then searched for it in opac and get the title in the<br>
same appearance as shown in the image linked earlier in this post.<br>
<br>
Can somebody make out what I have missed above in creating this<br>
koha_test db which supports utf8?<br>
<br>
Thanks.<br></blockquote></div><br></div></div>