CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Perl: How to convert db2 utf8 czech special character to latex format

 



zimso
New User

Sep 28, 2016, 8:06 AM

Post #1 of 1 (8840 views)
Perl: How to convert db2 utf8 czech special character to latex format Can't Post

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

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives