| Index | Manual | Download | Source | Macros | Embedded word Case ins.
Sitemap | Links | Forum | Tests | Projects

# Test t1360: Encoding string in code pages

Description
  "Latin Small Letter u with diaeresis" alias umlauted `ü` is encodable as Unicode `0x00FC`, which is in UTF-8 encoded as two bytes `0xC3,0xBC` treated by €ASM as two letters. Source text of the test is in UTF-8 encoding.
Tested procedures
  ExpStoreString ExpStoreUString

Source & expected listing t1360.htm.lst
  `| |EUROASM LIST=ON,DUMP=ON,DUMPWIDTH=36,AUTOALIGN=ON | |t1360 PROGRAM FORMAT=BIN,WIDTH=16,MODEL=TINY,LISTMAP=OFF,LISTGLOBALS=OFF |[DATA] |[DATA] | | EUROASM UNICODE=NO, CODEPAGE=UTF-8 ; Treat umlauted `ü` as one character encoded in UTF-8 as two bytes. |0000:4DC3BC6C6C6572 | DB "Müller" ; 7 bytes of UTF-8 text were emitted to data segment. |0007:00 ....AutoAlignment stuff. |0008:4D00FC006C006C0065007200 | DU "Müller" ; 6 wide (16bit) characters were emitted to data segment. | |ENDPROGRAM t1360`

Expected messages t1360.out
  `I0180 Assembling source file "t1360.htm". I0270 Assembling source "t1360". I0310 Assembling source pass 1. I0330 Assembling source pass 2 - final. I0470 Assembling program "t1360". "t1360.htm"{56} I0510 Assembling program pass 1. "t1360.htm"{56} I0530 Assembling program pass 2 - final. "t1360.htm"{56} I0660 16bit TINY BIN file "t1360.bin" created, size=20. "t1360.htm"{62} I0650 Program "t1360" assembled in 2 passes with errorlevel 0. "t1360.htm"{62} I0750 Source "t1360" (86 lines) assembled in 2 passes with errorlevel 0. I0860 Listing file "t1360.htm.lst" created, size=763. I0990 EuroAssembler terminated with errorlevel 0.`

Expected output file t1360. bin

      0000: 4D C3 BC 6C 6C 65 72 00 4D 00 FC 00 6C 00 6C 00  M¤¤ller°M°¤°l°l°
      0010: 65 00 72 00                                      e°r°

▲Back to the top▲