The problem may involve your method of querying data back from the table, and/or displaying the query results, as well as (or instead of) your method of inserting data into the table. It may also involve how the table is defined and how the database server is configured.

What are you using to view the table contents after the insertion? If you use a perl script, there's a chance that you can inspect the byte sequence as it comes out of the table, and that you can use the Encode module to make sure it gets interpreted correctly for use in a particular display.

I don't know about MSSQL, but I know that for MySQL, there are parameters at various levels for managing the character encoding -- for the server itself (set at start-up), for a given database, for a given table, for given fields in the table. If MSSQL provides docs on character encoding and collation, you'll need to consult that.

The particular example you give is puzzling (and I'm not sure whether the posted data accurately reflects your actual data). You might want to look at the input and output via a hex-dump tool. (You might also consider this tool, posted at the Monastery as tlu -- TransLiterate Unicode, which is helpful for referring to characters by their unicode "names" and hex codepoint values. That's the best way to talk about the data in cases like this.)


In reply to Re: Unicode insert into mssql from perl DBD by graff
in thread Unicode insert into mssql from perl DBD by Anonymous Monk

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.