Tags:
create new tag
view all tags

.TEXT TO UNICODE

This subroutine transcodes a RAW alpha field to a Unicode field. Added in 6.0.0


Usage

      PASS         <unicode_field>            FIELD            SHARE? Y
      PASS         <source_text>              FIELD            SHARE? N
      PASS         <encoding>                 FIELD            SHARE? N
      PASS         <error_text>               FIELD            SHARE? Y
      GOSUB    --- .TEXT TO UNICODE
      *        Check for errors
      IF       --- .TEXT TO UNICODE           NE

Description

This subroutine will transcode a RAW alpha field to a Unicode field. The first 2 parameters are required. If any required parameters are missing, the subroutine will CANCEL.

<unicode_field> is the Unicode field to receive the transcoded text (Required). This must be PASSed with Share "Y" to return the value.

<source_text> is the field containing the string to be transcoded (Required).

<encoding> identifies the encoding of the <source_text>. If not specified or a blank is PASSed, it will check the environment variable APPX_RAW_ENCODING and use that encoding. If that is not present, it will default to ISO-8859-15.

<error text> if an error occured this field contains additional error text from the Unicode library (Optional). This must be PASSed with Share "Y" to return the value.

Notes:

  • Normally this routine is not required as a simple SET from a RAW alpha to a Unicode field will automatically transcode it (using the APPX_RAW_ENCODING or the default ISO-8859-15 if not specified). If your source data is not in that encoding, then this routine can be used to transcode from the correct encoding.
  • This subroutine is designed to operate on Alpha, Text, and Token fields only. The returned results are undefined if you specify any other type of field.
Comments


-- Jean Neron - 2017-11-02

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2023-04-10 - BrianRyan
 
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