MySQLDumper-Board Forum Index Follow me on Twitter

Portal  •   Forum  •  Downloads  •  Profile  •  Search   •  Register  •  Log in to check your private messages  •  Log in  •  


 Changing default encoding

Post new topicReply to topic
Author Message
skygod
knows MySQLDumper
knows MySQLDumper




Age: 51
Joined: 31 Jul 2011
Posts: 2


thailand.gif

PostPosted: 2011-07-31, 11:26    Changing default encoding Reply with quoteBack to top

I have recently 'discovered' MySQLDumper 1.24.4 and have found it to be a great tool for managing database dumps between my development machine and production servers by using the automatic FTP transfer.

I now have a client that uses Thai text within their database and a restore of a local dump using the default utf8 caused the site to display in an unreadable form.

The live site has the following variables :

character set client utf8
(Global value) tis620
character set connection utf8
(Global value) tis620

My development site has

character set client utf8
(Global value) tis620
character set connection tis620

As I am developing a utility for a customer to automatically update their internet site from their intranet site at the end of each day, they need to remember to select tis620 in the dropdown for the backup or the internet site displays incorrectly.

Is there a way to change the default encoding or to simply hard code the encoding for them?

Thanks

OfflineView user's profileSend private message    
Anzeigen











Posted:    Anzeigen Back to top


    
DSB
Developer
Developer




Age: 41
Joined: 30 Apr 2004
Posts: 16067
Location: Reichenberg bei Würzburg


germany.gif

PostPosted: 2011-07-31, 11:52    (No subject) Reply with quoteBack to top

MySQLDumper pre-selects the detected standard encoding of the MySQL server.
Nevertheless you could overwrite this to fit your special needs.
Open the file filemanagement.php and change line 23 from
$dump['sel_dump_encoding']=(isset($_POST['sel_dump_encoding'])) ? $_POST['sel_dump_encoding'] : get_index($config['mysql_possible_character_sets'],$config['mysql_standard_character_set']);

to
$dump['sel_dump_encoding']=(isset($_POST['sel_dump_encoding'])) ? $_POST['sel_dump_encoding'] : get_index($config['mysql_possible_character_sets'], 'tis620');


This will make the character set tis620 pre-selected and your customer can now "forget" to change the encoding. Wink

_________________
Gruß / Greetings, DSB

Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
skygod
knows MySQLDumper
knows MySQLDumper




Age: 51
Joined: 31 Jul 2011
Posts: 2


thailand.gif

PostPosted: 2011-07-31, 13:14    (No subject) Reply with quoteBack to top

Many thanks.

I've had to strip out many of the options that deleopers would use, but now they will have a simple solution to backup, transfer and restore without being able to do any 'damage'.

Nice software!

OfflineView user's profileSend private message    
Display posts from previous:      
Post new topicReply to topic


 Jump to:   


Show permissions
Similar topics
Topic Author Forum Replies Posted
No new posts Language encoding and restore settings JimP Errors and questions 13 2010-09-23, 19:30 View latest post
No new posts is there a way to set default sorting? vesper8 Feature Requests 7 2010-02-12, 21:51 View latest post
No new posts sql-browser: insert default NULL kayf Gelöst/Erledigt 10 2009-08-12, 13:07 View latest post
No new posts cronjob und das encoding utf-8 und la... Dump8 Perl 4 2009-07-23, 11:57 View latest post
No new posts UTF-8 Encoding sanktusm Gelöst/Erledigt 1 2009-02-28, 21:16 View latest post

 
CrackerTracker © 2004 - 2012 CBACK.de

Powered by Orion based on phpBB © 2001, 2002 phpBB Group
CBACK Orion Style based on FI Theme
All times are GMT + 2 Hours

phpBB SEO