Hello,

please maybe someone can help me :

- I have a DB2 database which is in codeset UTF-8 and codepage 1208

- I have a field "lastname" which has some names which contain east european special character (š and á // s with caron or a with acute)

- my environment on the shell is LANG=de_DE.utf8

- I read the DB field with DBI module into Perl and want to convert the name to latex format for printing, but it doesn't work for the "s with caron"

á (a with a acute) (Unicode-Nummer: U+00E1 HTML-Code: á) ---->wanted goal: Latex format \'{a}

š (s with caron) (Unicode-Nummer: U+0161 HTML-Code: š) ---->wanted goal: Latex format \v{s}

I don't manage to convert the "s" character:

$tmp has ' áš'

I try a print TeX::Encode::encode('latex',$tmp); It gives : \'a?

\'a is correct "?" for the "š" is not

When I directly save the field to a file and look with a hexeditor on it it says: "e1 1a"

e1 is correct "1a" isn't (according to latin-2 it should be "b9")

Hmmm... Can someone please help me to manage to bring these east european names from a utf8 db to a universal latex format for printing ?

Many Many Thanks !!!!!!

Tina


In reply to Perl: How to convert db2 utf8 czech special character to latex format by zimso

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.