Differences
This shows you the differences between two versions of the page.
— |
printing_unicode [2021/04/05 11:23] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Printing Unicode ====== | ||
+ | Same as with displaying unicode you need to configure support for unicode on every level | ||
+ | |||
+ | * data (database or stream file) | ||
+ | * program | ||
+ | * printer file | ||
+ | * device | ||
+ | |||
+ | ===== Data ===== | ||
+ | |||
+ | ==== Database ==== | ||
+ | |||
+ | Unicode is supported by DDS and SQL. In SQL it needs to be declared as GRAPHIC or VARGRAPHIC with a corresponding CCSID. In DDS unicode field needs the graphic data type (G) and a corresponding CCSID, 1200 or 13488. | ||
+ | |||
+ | ==== Program ==== | ||
+ | |||
+ | At the program level the variables need to be defined with a corresponding ''' | ||
+ | |||
+ | dcl-s buffer char(1048576) ccsid(*utf8); | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | ==== Printer File ==== | ||
+ | |||
+ | The fields in the record needs the data type GRAPHIC (G) and a corresponding CCSID, 1200 or 13488). | ||
+ | |||
+ | As the same printer file is used for multiple languages a unicode field is configure (with GRAPHIC data type) we don't want to convert the data to the CCSID of the printer file so we neet to add the parameter '' | ||
+ | |||
+ | <sxh> | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | |||
+ | The printer file needs *AFPDS as the device type and for testing we want to create a PDF from it. | ||
+ | |||
+ | CHGPRTF FILE(I18NEXP1) DEVTYPE(*AFPDS) TOSTMF('/ | ||
+ | |||
+ | === Font === | ||
+ | |||
+ | And now comes the tricky part. The font also needs to have a glyph for the unicode characters we used. So first a font with unicode characters is needed and the system has some requirements to it. | ||
+ | |||
+ | There are several pages in the IBM Knowledge Center about it. | ||
+ | |||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | I ended up put a true type font file into a folder in the IFS , /// | ||
+ | |||
+ | ADDENVVAR ENVVAR(QIBM_FONT_RESOURCES_PATH) VALUE('/ | ||
+ | |||
+ | < | ||
+ | |||
+ | <note important> | ||
+ | |||
+ | {{tag> |