plainblack.com
Username Password
search
Bookmark and Share
View All Tickets
Charset DB connection  (#3670)
Issue

After add "Use UTF8 for database connection when connecting to MySQL" it does not work stable.

If I save text with cyrillics, that it once can save orderly, but under the repeated record why-that encodes twice, but not always. The Translation of the interface is seasonly displayed that in correct coding then in wrong, without what or regularities.

I tested it on Beta Demo & webgui.org.

(try type some cyrillics symbols for example: ????????)

If I replace (WebGUI::SQL line 323):

    my $dbh = DBI->connect($dsn,$user,$pass,{RaiseError => 0, AutoCommit => 1,
        $driver eq 'mysql' ? (mysql_enable_utf8 => 1) : (),
    });

to:

    my $dbh = DBI->connect($dsn,$user,$pass,{RaiseError => 0, AutoCommit => 1,
#        $driver eq 'mysql' ? (mysql_enable_utf8 => 1) : (),
    });
            $dbh->do("SET NAMES utf8");

after it all work stable.

I do not offer to change exactly so, I, simply, wanted to show that existing variant does not work so, as it was expected.


Vladimir Vitkovsky
http://www.webgui.uanet.biz/
http://web-octopus.com
http://www.transport.su/

 

Solution Summary
Comments
Graham
0
3/27/2008 8:08 am
Most likely the character set of the tables in your database is incorrect.  I'll add a script to the 7.5.9 release to ensure all tables have the correct character
Graham
0
3/27/2008 8:08 am
Most likely the character set of the tables in your database is incorrect.  I'll add a script to the 7.5.9 release to ensure all tables have the correct character
Graham
0
3/27/2008 3:07 pm
Added character set conversion to 7.5.9 upgrade.  It should work, but do you have a dev site you could test it
Graham
0
4/4/2008 9:21 am

 I ended up not adding this to the 7.5.9 upgrade, but putting it in the 7.5.6 upgrade instead.

The reason for this is that the process to do this repair would corrupt any international characters added after 7.5.6.  If you have already upgraded past 7.5.6, you'll want to run the script I'm attaching that does the same process as is found in the upgrade.  You may wish to export newer content as packages and reimport it after running this script.

Save in /data/WebGUI/sbin and run as

perl dbcharsetrepair.pl --configfile=mysite.com.conf

Details
Ticket Status Closed  
Rating0.0 
Submitted ByVitkovsky 
Date Submitted2008-03-27 
Assigned To unassigned  
Date Assigned2020-07-08 
Assigned By 
Severity Critical (mostly not working)  
What's the bug in? WebGUI Beta  
WebGUI / WRE Version 7.5.7  
URLbugs/tracker/charset-db-connection
Keywords
Related Files
Ticket History
© 2020 Plain Black Corporation | All Rights Reserved