Textdriver - UTF-8

Author: juerg.fross@teamspirit.ch (jfro)

Hi all

We have an interface where we loaded up to now data from an ASCII-file using the "Uniface Textdriver" in our Database.

The system which generated the ASCII-File was now updated and delivers now UTF-8 - Files. This provokes an "Error -3 font not allowed" in our application.

  • Does anybody know if the "Uniface Textdriver" is able to read UTF-8 - Files?
  • If yes - do you have any tips what would have to be done to run the File load with UTF-8 - Files again?





  1. Hi Jürg,

    I got an info from a friend a couple of weeks ago
    that they have written their own unicode TXT driver surrogate based on a standard DB-Connector.

    According to his mail from 2012-01-31, they have done this because CPWR stated their TXT driver can not handle Unicode properly.

    Looks like the IndicatorFlag (for big or little endian) at the beginning of the file has caused the error.

    If you just wanna read the file, you have have a look at the USEQREAD sources
    (available in a lot of places including http://march-hare.com/puuu/tools/file.html).

    In fact it is is nothing more than a "open textfile" - "read textline" - "close textfile" and it should be converted from C* to W* with ease.


    Another option (if you have to handle it ASCII in your uniface application):
    link a Unicode-2-ASCII converter between the original file and the one you target with TXT driver

    to get the most actual content, just spawn"#convert ..."
    before you run your TXT retrieve


    Author: ulrich-merkel (ulrichmerkel@web.de)
  2. We have now the confirmation of Compuware that there is no plan that the text-driver will be adapted to be able to treat UTF-8.

    The proposition of Compuware is to use instead fileload / filedump...




    Author: jfro (juerg.fross@teamspirit.ch)
  3. so it's better to upgrade USEQREAD to handle UNICODE.

    So at least you need only the memory of a single line instead of the whole filesize.

    But you have used the whole filesize as well with TXT friver.


    The alternative would be someone gives us an open-source TXT connector

    Author: ulrich-merkel (ulrichmerkel@web.de)