Re: automated character set conversions for tables

2007-02-06 Thread Luis Filipe Lobo
Hi

You can 'attack' the problem from another perspective :-P

I found out a tool (Linux) to convert all characters in a latin1 file to
utf8.
The command name is 'iconv' and in Debian it is shipped with the libc6
package.
So basically dump you DB and convert the file then import it.

See the article here:

http://gentoo-wiki.com/TIP_Convert_latin1_to_UTF-8_in_MySQL

Hope it helps.


[EMAIL PROTECTED] wrote:
 Hello Jerry,

 Thanks for the reply. You are right. Thats why it finally took me
 10-12 work hours to convert a single DB (split over two work days) to
 a UTF-8 compliant version.

 While it wasnt necessarily difficult to do (once you figured it out),
 it can put extra pressure on your eyes if you have to concentrate on
 the screen all the time ;-).

 If somebody knows of a smart tool that is doing the hart work feel
 free to speak ;-)

 Best regards

 Nils Valentin



 Quoting Jerry Schwartz [EMAIL PROTECTED]:

 Columns can have character set definitions, also. In this case, I
 hope not.

 Regards,

 Jerry Schwartz
 Global Information Incorporated
 195 Farmington Ave.
 Farmington, CT 06032

 860.674.8796 / FAX: 860.674.8341


 -Original Message-
 From: Chris White [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, January 10, 2007 10:59 AM
 To: [EMAIL PROTECTED]
 Cc: mysql@lists.mysql.com
 Subject: Re: automated character set conversions for tables


  I did a DB conversion before that with ALTER DATABASE db_name
  CHARACTER SET utf8
  That worked wonderfully, except not as expected. ;-)
  It basically converted only the database itself. so I had to do a
  separate ALTER TABLE ... for each table.

 The database encoding more establishes the default to use
 when creating
 new tables.  As far as adjusting every single table,  you can
 work with
 your Favorite Scripting Program (tm) and run the query:

 `SHOW TABLES`

 to get a list of all tables for that database (the column you want is
 called Tables_in_[database name here]), which you can get the exact
 column by running it in console or your Favorite SQL Program
 (tm).  Then
 simply loop over the result set and run the alter table
 command on each
 table.

 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]









 --MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]





-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: automated character set conversions for tables

2007-01-17 Thread valentin_nils

Hello Jerry,

Thanks for the reply. You are right. Thats why it finally took me  
10-12 work hours to convert a single DB (split over two work days) to  
a UTF-8 compliant version.


While it wasnt necessarily difficult to do (once you figured it out),  
it can put extra pressure on your eyes if you have to concentrate on  
the screen all the time ;-).


If somebody knows of a smart tool that is doing the hart work feel  
free to speak ;-)


Best regards

Nils Valentin



Quoting Jerry Schwartz [EMAIL PROTECTED]:


Columns can have character set definitions, also. In this case, I hope not.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341



-Original Message-
From: Chris White [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 10, 2007 10:59 AM
To: [EMAIL PROTECTED]
Cc: mysql@lists.mysql.com
Subject: Re: automated character set conversions for tables


 I did a DB conversion before that with ALTER DATABASE db_name
 CHARACTER SET utf8
 That worked wonderfully, except not as expected. ;-)
 It basically converted only the database itself. so I had to do a
 separate ALTER TABLE ... for each table.

The database encoding more establishes the default to use
when creating
new tables.  As far as adjusting every single table,  you can
work with
your Favorite Scripting Program (tm) and run the query:

`SHOW TABLES`

to get a list of all tables for that database (the column you want is
called Tables_in_[database name here]), which you can get the exact
column by running it in console or your Favorite SQL Program
(tm).  Then
simply loop over the result set and run the alter table
command on each
table.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]











--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: automated character set conversions for tables

2007-01-10 Thread Chris White


I did a DB conversion before that with ALTER DATABASE db_name 
CHARACTER SET utf8

That worked wonderfully, except not as expected. ;-)
It basically converted only the database itself. so I had to do a 
separate ALTER TABLE ... for each table.


The database encoding more establishes the default to use when creating 
new tables.  As far as adjusting every single table,  you can work with 
your Favorite Scripting Program (tm) and run the query:


`SHOW TABLES`

to get a list of all tables for that database (the column you want is 
called Tables_in_[database name here]), which you can get the exact 
column by running it in console or your Favorite SQL Program (tm).  Then 
simply loop over the result set and run the alter table command on each 
table.


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



RE: automated character set conversions for tables

2007-01-10 Thread Jerry Schwartz
Columns can have character set definitions, also. In this case, I hope not.

Regards,

Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032

860.674.8796 / FAX: 860.674.8341


 -Original Message-
 From: Chris White [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, January 10, 2007 10:59 AM
 To: [EMAIL PROTECTED]
 Cc: mysql@lists.mysql.com
 Subject: Re: automated character set conversions for tables


  I did a DB conversion before that with ALTER DATABASE db_name
  CHARACTER SET utf8
  That worked wonderfully, except not as expected. ;-)
  It basically converted only the database itself. so I had to do a
  separate ALTER TABLE ... for each table.

 The database encoding more establishes the default to use
 when creating
 new tables.  As far as adjusting every single table,  you can
 work with
 your Favorite Scripting Program (tm) and run the query:

 `SHOW TABLES`

 to get a list of all tables for that database (the column you want is
 called Tables_in_[database name here]), which you can get the exact
 column by running it in console or your Favorite SQL Program
 (tm).  Then
 simply loop over the result set and run the alter table
 command on each
 table.

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:
 http://lists.mysql.com/[EMAIL PROTECTED]






-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]