1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

@ascii[] btwn v8 and v14

Discussion in 'Support' started by Charles G, May 21, 2012.

  1. Charles G

    Charles G

    Messages:
    428
    I have some files I am trying to process under both v8 and 14. Under 8 i works fine but doesn't uinder 14. I made a list of the filenames then removed the obvious chars of a-z and 0-9 and then removed the duplicate chars. I then did

    Code:
    for %data in (@newerror.txt) echo [EMAIL]%@ascii[%data][/EMAIL]
    under v8 and v14. Under 8 I got:

    7
    38
    39
    40
    41
    44
    46
    91
    93
    95
    8364
    8218
    8222
    8224
    8225
    710
    352
    338
    141
    8216
    160
    161
    162
    164
    165
    173
    225

    but under 14 I got

    7
    38
    39
    40
    41
    44
    46
    91
    93
    95
    199
    233
    228
    229
    231
    234
    232
    238
    236
    230
    225
    237
    243
    241
    209
    161
    223

    Why would I get two different values for the 2 different versions?
  2. Steve Fabian

    Steve Fabian

    Messages:
    3,531
    Since ASCII is a 7-bit code, its values are in the 0...127 range. All codes larger than 127 come from non-ASCII characters; the same glyph may have a different code in a different code page. Do you use the same font and the same code page for V8 and V14? Any difference may account for your observation. However, I the values exceeding 255 seem really strange - as if you file were unicode, not ASCII...
  3. Charles G

    Charles G

    Messages:
    428
    I use the same codepage and font. would using unicode[] be the best idea now? I just don't understnad why two versions of the same program woulkd have entirely different results.

    I have also just attached the file I am talking about....

    Attached Files:

  4. Steve Fabian

    Steve Fabian

    Messages:
    3,531
    OK, I looked at the file, it is not unicode (utf-16). I know nothing about UTF-8, but it does not appear to be that, either. It's mostly ASCII, with a few bell (BEL, ^G, 0x07) characters, a lot of punctuation characters, letters, numerals, and a smattering of non-ASCII characters displayed here as European accented characters.
  5. Steve Fabian

    Steve Fabian

    Messages:
    3,531
    I used my editor to strip letters and numbers, and created my own file of one character lines for each different character code. I used the command below to list it in 4nt8, a similar one for TCC14. The log files were identical!

    ( for %l in (@move.chr) ( iff "%l" NE "" then ^ echo %@ascii[%l] %l ^ else ^ echo. ^ endiff ) ) > v08.log

    My environment: WinXP Home SP3, raster fonts for both 4nt and TCC; code page 437 for both.
  6. Charles G

    Charles G

    Messages:
    428
    Would you send me move.cv08.log and I assume v14.log please? CSGalloway at nc dot rr dot com .

    How can I tell what font (and if it's raster) I use in tcmd/tcc and what code page in Windows I use?

    TVMIA
  7. Charles G

    Charles G

    Messages:
    428
    ( for %l in (@move.chr) ( iff "%l" NE "" then ^ echo %@ascii[%l] %l ^ else ^ echo. ^ endiff ) ) > v08.log

    In the above command - why is the [ iff "%l" NE "" then] test necessary? I stil don't understand why I am getitng different results from two different TCMD/TCC versions...

Share This Page