Display unicode text in compiler mode

  • Hi all


    I have defined the Unicode Text in the script file as following :
    TEXT: TXTxHelloWord{ NUMBER: 1 X: 100 Y: 100 FONT: Font2_Unicode_Normal FGCOLOR: RED "Hello World" }
    The script will be stored with 16bit characters.


    I have compiled it and download to the DCUL4.
    However when I show this text with compiler mode command ( T1,<LF>),
    the text "þÿ" (code: fe ff) is displayed, but expected is "Hello World"


    The problem don't appear when I do with DCUL7.


    Could you please explain the root cause of problem?
    Thanks.


    Thai Tran.

  • I would say this will never work. When you look at the software version of the DCUL4, it is something rather old. The newest official version available for DCUL4 was N161V2. But Unicode support for DCU was started after the DCUL4 was already discontinued and the first versions with Unicode were around N166 and later. Therefore there never was a DCUL4 version with Unicode support. I'm sorry but this code won't run on the DCUL4.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hi all,


    I have two questions about above problem as following :


    1. My colleague says that the DCUL4 firmware (N161V2, relevant here is the V2 version of the internal font structure) supports Unicode characters in Compilermode. "
    And he suggest I should use the compiler "DCU Compiler for Unicode C321144.exe†to compile the script.
    I have compiled the script with two compilers( DCUC32.exe and C321144.exe), two DEFs file are generated.
    I compared them. And I see that, they only different one byte at offset 000000AF( 000000AF: 7C 78 ) .
    Would you please explain me the different between two above compilers and DEF files?


    2. If could, you tell me the format of DEF file ?


    Thanks.
    Thai Tran.

  • Quote from "thaisalem"

    1. My colleague says that the DCUL4 firmware (N161V2, relevant here is the V2 version of the internal font structure) supports Unicode characters in Compilermode. "


    That's not fully correct. The V2 in the version number indicates the size of internal data structures. It decides what data structures the compiler must create. V1 was the first version for DCUL2 and DCUL3 (with Firmware written in the language Forth), the V2 was for DCUL3/4/5 with Firmware (written in C), V3 was only for a customer specific version, and V4 is for DCUL7/8 and SDCUL1. It has nothing to do with the font file format.


    However there was in fact some support for 16 bit characters in V161 (September 2002), but it was only for texts sent in Terminalmode. The internal conversion from 8 to 16 bit characters took quite a few versions until it was completed. But 16 bit character texts that are defined in Compilermode were not possible before V167 (March 2003). V167 was the major step in the internal conversion to support Unicode. At the same time, March 2003, the first Compiler (V1.135) that supported Unicode texts was released.


    Quote

    And he suggest I should use the compiler "DCU Compiler for Unicode C321144.exe†to compile the script.
    I have compiled the script with two compilers( DCUC32.exe and C321144.exe), two DEFs file are generated.
    I compared them. And I see that, they only different one byte at offset 000000AF( 000000AF: 7C 78 ) .
    Would you please explain me the different between two above compilers and DEF files?


    DCUC32.exe is the standard name of the compiler as it was available when the CD was created. Depending on the date when you purchased the DAISY system, it contains some version of the compiler. You will find the version in the output window of the compiler, right at the top. Usually you must scroll the window to see the date and version.


    C321144.exe is the 8.3 shortcut of DCUC32-V1.144.exe. Therefore it is simply the compiler with V1.144. We introduced these shortcuts at times when there was no VFAT and all file names had to use at most 8 characters for the name plus 3 characters for the extension. You see, the compiler is already quite some years old, from times way before Win95.


    Well, V1.144 of the compiler is from September 2004. Therefore it is in fact capable of compiling Compilermode Unicode texts. But the DCUL4 software N161V2 is not capable of showing them. Yes it may be that N161V2 can show Unicode texts sent in Terminalmode, but not text definitions from Compilermode.


    Quote

    2. If could, you tell me the format of DEF file ?


    It is a binary format containing lots of data structures and pointers. And as already indicated above, its format depends on the number in the V-part of the official firmware version number (NxxxVy). We never released this format to the public, as it does not make sense. It is generated by the Compiler and read by the DCU firmware. There is no need for the end user to change something meaningful here. In fact I can't tell you the meaning of the byte at index 000000AF without a deeper look at the source code myself.


    Your F&S support team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.