CNV TEXT Statement

Overview

Converting To and From alpha fields

  • Both fields are RAW
    • No change in behavior
  • Both fields are UNICODE or NATIONAL
    • Same basic behavior
    • UTF-32 characters are being moved.
  • From RAW to UNICODE or NATIONAL
    • Same basic behavior
    • Each RAW character is transcoded to its UTF-32 character before setting into the destination field.
  • From UNICODE or NATIONAL to RAW
    • Same basica behavior.
    • Each UNICODE or NATIONAL character is transocded to an 8859-15 character during the move.
    • An error will be thrown when a character can't be transcoded to 8859-15.

Converting Numeric, Date, and Logic fields

  • From Alpha
    • No change in formatting behavior
    • Alpha data can be RAW, UNICODE, or NATIONAL.

Converting To and From a Record

  • To Alpha from Record
    • No change in behavior.
    • Each field in the record is converted to the appropriate alpha string using the same rules that apply when converting a singer field of the same type.
  • From Alpha to Record
    • No change in behavior.
    • Each field in the record is converted from the subset of the alpha field using the same rules that apply when converting a single field of the same type.

Test Plan

  1. Test CNV TEXT with all combinations of RAW, UNICODE, and NATIONAL.
  2. Test CNV TEXT to a Record using RAW, UNICODE, and NATIONAL alpha fields.
  3. Test CNV TEXT from a Record using RAW, UNICODE, and NATIONAL alpha fields.
  4. Test CNV TEXT with a Token field
  5. Test CNV TEXT with Numeric, Date, and Logic fields using RAW, UNICODE, and NATIONAL alpha fields.

Bugs

  1. It's not handling Logic fields properly. When CNV TEXT into National/Unicode from Logic the destination field is wrong somehow. It looks ok in the debugger, but if I display it on an image, it shows the field is filled with reverse image diamonds. When comparing via IF to either Y or N, always returns False
  2. Since SET does not work with Group fields and National/Unicode fields, then this probably should not either. It does give compile errors, but the error is "Length of Record Exceeds Maximum Allowed (32k)". Probably should give the same error SET does: "Invalid Storage Type".
  3. when converting from Unicode to National, where the Unicode field contains characters not in the National character set, does not throw a transcode error. It should.
  4. When converting from Unicode to Raw, where the Unicode field contains characters not in the Raw character set, does not throw a transcode error, just silently drops the Unicode character. Should be a transcode error.
  5. When converting a Unicode field containing a spiky ball (0xA4), I get a Euro symbol in my Raw field.
  6. When converting from Unicode to National or Raw, causes Appx to crash. Not sure if it's the National or Raw, all the statements run but when the Event Point ends, the client closes. Doesn't seem to matter if there's any data to convert or not. This also happened when converting from National to Unicode/Raw, but somewhat inconsistently. It worked for a while, then suddenly started crashing Appx every time.
  7. When converting from National to Raw, where National field contains a character not in the Raw character set, does not throw a transcode error. The character is silently converted to something else.
  8. When converting from Unicode Text to National or Raw array, does not word wrap.
  9. When converting from Unicode Text to National or Raw array, does not throw transcode errors, just silently converts the characters to something else (Raw) or converts them unchanged (National). Raw array sometimes contains garbage characters, this might depend on the specific strings entered.
  10. When converting from National Text to Unicode or Raw array, does not word wrap.
  11. When converting from National Text to Raw array, converts spiky ball (0xA4) to euro symbol.
  12. When converting from Raw Text to National or Unicode array, does not word wrap.
  13. When converting from Token to National or Unicode, unused parts of destination are not cleared.
  14. When converting from National or Unicode to Format field, C-assert 'Unexpected src_buf size (15)' in module CVALP.C.1945 and format field contains incorrect data.
  15. When converting from National or Unicode back to Raw, it only moves the part of the string. Sometimes just the first word, sometimes more.
  16. Does not give transcode error when converting Unicode to Raw when Unicode contains non Raw characters
  17. Does not move all characters when converting from Unicode to Raw (destination truncated)
  18. Does not give transcode errors when converting from Raw to National when Raw contains non National Characters.
  19. Does not move all characters when converting from Unicode to Raw (destination truncated)
  20. Does not give transcode error when converting Unicode to National when Unicode contains non National characters
  21. When CNV TEXT from Unicode into occ (1) of multi occ National field, occ (2) of the destination is cleared. If the source field was a TEXT type field and I specified 000 as a destination occ number, that would make sense, but the source is plain alpha and I did not specify occ 000 on the destination. Is it supposed to work this way?

-- PeteBrower - 2011-03-17

Edit | Attach | Watch | Print version | History: r17 | r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r6 - 2011-05-13 - JeanNeron
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback