OK, let's try to do this step by step.

First, try this script:

use utf8; binmode STDOUT, ':encoding(UTF-8)'; print "Séan\n"

Does this work fine? If yes, as the next step, use the first two lines as the preamble for all of the following scripts.

Try to read the string "Séan" from the database base after you have inserted it via the mysql command line client. Does that work?

Then insert that string (as a literal, ie stored directly in the text file) into the database, and read it from the DB via the mysql command line. Does that work?

If any of those does not work, please copy&paste the output here, even if it contains "weird" characters.

If all of these work, you should also be able to round-trip the characters via perl+DBI.


In reply to Re: DBI inserting accents by moritz
in thread DBI inserting accents by packetstormer

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.