CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Hebrew
Pages: 1 [2]

Author Topic: Hebrew  (Read 13116 times)

FredJones

  • Guest
Re: Hebrew
August 02, 2007, 12:36:00 pm
Quote from: Micha? Mach on August 02, 2007, 12:25:38 pm
(is it the right word to use instead of "Hey" at the beginning of the message?) :-)

It's not wrong. :)

Quote from: Micha? Mach on August 02, 2007, 12:25:38 pm
We're getting offtopic here, so I won't press you anymore. ;) I remember not being able to imagine switching to Linux - and it lasted only until I switched. :) I still have Windows on my workstation, but didn't boot with it for many, many months now.

OK, thanks for the encouragement. Truth is that the other thing is testing on IE all the time...

Quote from: Micha? Mach on August 02, 2007, 12:25:38 pm
But you can connect remotely from your desktop - just give mysql command line host and port parameters and it should attach to remote server without a problem. Technically, it's almost the same way as your CiviCRM install is connecting to the database, so they shouldn't be blocking it.

However, as said before, there is a learning curve in the beginning which requires some time, so you might want to start learning it after you fix your db encoding problems.

I have used it before--I didn't know about remote connect. I think I must do this now. Thanks.

Because I realized in the meantime that the dump is the issue, not the insert. The dump is bad data. I have confirmed this. OK, I will try with the command line, probably Sunday.

Thanks.

FredJones

  • Guest
Re: Hebrew
August 08, 2007, 07:34:25 am
I tried using MySQL command line to speak with each server. Didn't help--I got the same results.

The only thing I have now found that WORKS is to use a PHP script to get the data from the 1.4 install and insert it into the 1.8. So now I must go through each table and figure out what data I can extract and copy over. Painstaking, but it seems to be working.

Fred

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Hebrew
August 09, 2007, 01:55:46 am
Ok, I’m back from פריז (including the fascinating district of המארה). :)

After reading the above, I assume the problem might indeed be in connection character set specification. While this shouldn’t really affect the dump, it can affect the upload of the data; basically, if you have an UTF-8 dump, you should issue before importing (or add to the dump) a SET NAMES utf8 SQL command.

Do let me know if this helps of if you make any other progress with your case.
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

FredJones

  • Guest
Re: Hebrew
August 09, 2007, 10:37:53 am
Excellent Hebrew. :)

The odd thing about this MySQL issue is that when I import my data, it also ruins the UTF chars in the currency table. I have no idea why.

Anyway I have a set of custom scripts now that populate the tables that we use, thankfully it's not too many, and this method works, so I will run it tonight and then hopefully be done with the transfer.

I guess next time around, if necessary, I will deal with this again.

Thanks for your help,
Fredly

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Hebrew
August 09, 2007, 12:22:49 pm

hershel:

no hassle. would be great if you could repay the favor and help answer a few posts on the forum over the next week or so. Also you could help with the hebrew translation for CiviCRM and get it to a better state. That would be a great contribution!

http://translations.civicrm.org/he_IL/

lobo

A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Hebrew
August 10, 2007, 03:47:36 am
Quote from: FredJones on August 09, 2007, 10:37:53 am
Excellent Hebrew. :)

Wikipedia is my castle. :)

Quote from: FredJones on August 09, 2007, 10:37:53 am
The odd thing about this MySQL issue is that when I import my data, it also ruins the UTF chars in the currency table. I have no idea why.

This means there’s something wrong; our template file for civicrm_currency is in UTF-8…
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

FredJones

  • Guest
Re: Hebrew
August 12, 2007, 07:26:04 am
Quote from: Piotr Szotkowski on August 10, 2007, 03:47:36 am
This means there’s something wrong; our template file for civicrm_currency is in UTF-8…

I misspoke. What I meant is that if I do an upgrade, then it indeed DOES ruin that table. If I use a fresh V1.8 install and then use my custom PHP scripts to import my V1.4 data, then everything works. Interestingly enough, here is my code for one table:

Code: [Select]
$dbh = mysql_connect('OLD SERVER') || die("Could not connect to MySQL Server");;
mysql_select_db('OLD_DB') || die("Could not connect to SQL database");
//mysql_query("SET NAMES 'utf8'") or die('SET NAMES failed');

$sql = "select * from  `civicrm_individual`";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)) {
$rows[] = $row;
}

$dbh = mysql_connect('NEW SERVER') || die("Could not connect to MySQL Server");;
mysql_select_db('NEW DB') || die("Could not connect to SQL database");
mysql_query("SET NAMES 'utf8'") or die('SET NAMES failed');

foreach($rows as $row)
{
$row['first_name'] = addslashes ($row['first_name']);
$row['middle_name'] = addslashes ($row['middle_name']);
$row['last_name'] = addslashes ($row['last_name']);
$sql = "insert into `civicrm_individual` ( `id`,`contact_id`,`first_name`,`middle_name`,`last_name`,`prefix_id`,`suffix_id`,`custom_greeting`,`job_title`,`gender_id`,`birth_date`,`is_deceased`,`phone_to_household_id`,`email_to_household_id`,`mail_to_household_id` ) values ".
  "(    '{$row['id']}','{$row['contact_id']}','{$row['first_name']}','{$row['middle_name']}','{$row['last_name']}','{$row['prefix_id']}','{$row['suffix_id']}','{$row['custom_greeting']}','{$row['job_title']}','{$row['gender_id']}','{$row['birth_date']}','{$row['is_deceased']}','{$row['phone_to_household_id']}','{$row['email_to_household_id']}','{$row['mail_to_household_id']}'  );";

include "runsql.php";
}

This code works, but if I remove the comments from:

Code: [Select]
//mysql_query("SET NAMES 'utf8'") or die('SET NAMES failed');

then I get garbage. So I think there maybe something odd with my V1.4 DB. It is, BTW, the notoriously bad version of MySQL 4.0. I think 4.0.27 maybe.

Anyway, I have run my scripts, and all data is in and we are proceeding now with 1.8.

:)

Piotr Szotkowski

  • I live on this forum
  • *****
  • Posts: 1497
  • Karma: 57
Re: Hebrew
August 13, 2007, 09:46:38 pm
Quote from: FredJones on August 12, 2007, 07:26:04 am
I misspoke. What I meant is that if I do an upgrade, then it indeed DOES ruin that table. If I use a fresh V1.8 install and then use my custom PHP scripts to import my V1.4 data, then everything works.

Based on this and the above code snippets, my take is that your CiviCRM 1.4 was indeed borked. That said…

Quote from: FredJones on August 12, 2007, 07:26:04 am
It is, BTW, the notoriously bad version of MySQL 4.0. I think 4.0.27 maybe.

Ah-ha! MySQL 4.0 does not have a proper UTF-8 support, period. For UTF-8, you really have to run MySQL 4.1 – so that was it.

Quote from: FredJones on August 12, 2007, 07:26:04 am
Anyway, I have run my scripts, and all data is in and we are proceeding now with 1.8.

Cool. Do let us know if you have any other issues with CiviCRM. :)
If you found the above helpful, please consider helping us in return – you can even steer CiviCRM’s future and help us extend CiviCRM in ways useful to you.

FredJones

  • Guest
Re: Hebrew
August 14, 2007, 02:08:04 am
Quote from: Piotr Szotkowski on August 13, 2007, 09:46:38 pm
Based on this and the above code snippets, my take is that your CiviCRM 1.4 was indeed borked. 

LOL

Quote from: Piotr Szotkowski on August 13, 2007, 09:46:38 pm
Ah-ha! MySQL 4.0 does not have a proper UTF-8 support, period. For UTF-8, you really have to run MySQL 4.1 – so that was it.

Ah, this explains why it took me literally DAYS to get the data in there and the DAYS this time to get it out again.

I will avoid uploading any *really* deragatory comments toward this host which I am never using again.

Quote from: Piotr Szotkowski on August 13, 2007, 09:46:38 pm
Cool. Do let us know if you have any other issues with CiviCRM. :)

Well, there is one issue with some guy in Poland who is apparently prejudiced against the Hebrew language, but I think I can handle him myself. ;)

Pages: 1 [2]
  • CiviCRM Community Forums (archive) »
  • Discussion »
  • Internationalization and Localization (Moderators: Michał Mach, mathieu) »
  • Hebrew

This forum was archived on 2017-11-26.