in reply to Re^3: Print unicode strings to pdf
in thread Print unicode strings to pdf

I am using MySQl and using the source command with a source file to insert into the table:
insert_test (plaintext source file) INSERT INTO test VALUES(NULL, "\\x{20ab}"); INSERT INTO test VALUES(NULL, "\\x{005a}\\x{0024}"); INSERT INTO test VALUES(NULL, "\\x{0042}\\x{0073}"); mysql> source C:/Program Files/MySQL/MySQL Server 5.0/sql/insert_test
Could you enlighten me on a string like this '\x{005a}'? Is it called a unicode string? And is that what we should store in the database (MySQL)?

Replies are listed 'Best First'.
Re^5: Print unicode strings to pdf
by thanos1983 (Parson) on Mar 26, 2018 at 15:02 UTC

    Hello again Anonymous Monk,

    Everything you are looking for is here A UTF8 round trip with MySQL.

    More specifically:

    use DBI(); my $dbh = DBI->connect ('dbi:mysql:test_db', $username, $password, {mysql_enable_utf8 => 1} );

    Let the MySQL do all the work for you. By doing this This step connects to the database, and tells DBD::mysql to auto-convert to/from UTF-8..

    Hope this helps, BR.

    Seeking for Perl wisdom...on the process of learning...not there...yet!
      Hey thanos1983! Thank you so much. Have never tried connecting with that additional setting mysql_enable_utf8. Will try it and post back later.