FLAM Issue Tracker - FL5
View Issue Details
0000598FL54. Element, Byte, Record or other APIpublic2014-11-13 12:012015-04-15 15:36
Falk Reichbott 
Mykhailo Moldavskyy 
0000598: Provide FLAM character conversion modul as separate target
To use the character conversion feature (subset) of FLAM in application it would be useful to support the FLICV module as own target.
No tags attached.
Issue History
2014-11-13 12:01Falk ReichbottNew Issue
2014-11-13 12:01Falk ReichbottStatusnew => assigned
2014-11-13 12:01Falk ReichbottAssigned To => Mykhailo Moldavskyy
2014-11-18 07:57Falk ReichbottTarget Version5.2 => 5.1
2014-11-21 15:56Falk ReichbottNote Added: 0000697
2014-11-27 08:18Falk ReichbottNote Added: 0000704
2014-11-27 08:18Falk ReichbottStatusassigned => resolved
2014-11-27 08:18Falk ReichbottFixed in Version => 5.1
2014-11-27 08:18Falk ReichbottResolutionopen => fixed
2014-11-27 08:31Falk ReichbottNote Edited: 0000704bug_revision_view_page.php?bugnote_id=704#r202
2014-12-02 07:43Falk ReichbottCategory4. Element, Byte or Record API => 4. Element, Byte, Record or other API
2015-04-15 15:36Falk ReichbottFixed in Version5.1 => 5.1.02

Falk Reichbott   
2014-11-21 15:56   
Separate DLL for character conversion (libfl5icv.so/dll FL5ICVLB) add with version 5.1.2. Doxygen interface specification is still unter construction.
Falk Reichbott   
2014-11-27 08:18   
(edited on: 2014-11-27 08:31)
Available with version 5.1.2


This module provides a libiconv conform interface for memory to memory character conversion. All special feature of the FLUC character conversion module are provided over the TO and FROM string specification in fliconv_open() function.


Please have a look at the FLICONV.c sample file which implements the linux like ICONV utility (fliconv) based on this library.

The open function supports encoding strings and CCSIDS. The fliconv_list() function provides all supported CCSIDs, CHARSETs and the corresponding encoding strings. If the compiler switch FICONV defined, then all the 'fliconv' entries are also available as 'iconv' functions. Means to port your existing code you must simply replace:

+#define FICONV

With this replacement you can re-build your source. To use the special features you must extent our encoding strings specifications.

Input encoding string enhancements:

    //BOM - Manage byte order change
    //ENL2LF - Convert EBCDIC new line (0x15) to line feed (0x0A)

Output encoding string enhancements:

    //BOM - Write byte order mark
    //ELF2NL - Convert EBCDIC line feed (0x0A) to new line (0x15)
    //TOUPPER - Upper case mapping
    //TOLOWER - Lower case mapping
    //TOSUPPER - Special upper case mapping
    //TOSLOWER - Special lower case mapping
    //TOFOLD - Special case folding
    //TOUESR - User table/module defined case mapping
    //IGNORE - Ignore invalid characters
    //TRANSLIT['('[systab]')'] - Transliterate invalid characters [ICONV]
    //SUBSTITUTE['('[codepoint_list]')'] - Substitute invalid characters [0x1A]
    //USRMOD'('module_name')' - Use a predefined user table module
    //USRTAB'('file_name')' - Use a free defined user table text file
    //REPORT['('[file_name]')'] - Write a report file [STDERR]

 Current supported system transliteration table:

    ICONV - Transliteration table of libiconv

Current supported user table module names:

    CCUTNPAS - UCS subset for String-Latin (XOEV/NPA)
    CCUTSPEA - UCS subset for SEPA (all valid UTF-8 character < 128)
    CCUTDELA - UCS subset of IBM1141, CP1252 and ISO8859-15
    CCUTDLAX - UCS Subset of IBM1141, CP1252, ISO8859-15 and XOEF

For more information about free defined user table text file please refer to the FLCL user manual.

Advantage to normal iconv implementations:

- Support of encoding string and CCSIDs, list supported CCSIDs and Encoding strings
- EBCDIC New Line (0x15) to Line Feed (0x0A) management
- Subset support (String.Latin, SEPA, ...) and free defined user tables
- Recursive mapping and transliteration ('U:'->'UE')
- Case mapping, comprehensive reporting, byte order change handling
- A little bit faster and less memory and CPU consumption

Differences to the normal iconv:

- Use more errno's (mainly for user table parsing and such things, not for conversion it self)
- E2BIG is set if the output buffer smaller then the input data multiplied by the provided expansion factor -> No data is converted if the output buffer to small (increase performance significantly)
- More functions to provide about, version, license, statistic, error and other information
- Byte order mark is only printed to the output file if the BOM keyword defined in the TO string
- The list function get encoding string, the CCSID and the corresponding CHARSET (UTF/ASCII/EBCDIC) information

For additional information please refer to the interface specification in the Download area.