Functionality SCP_REPLACE_STRANGE_CHARS> processes a text so that it onlycontains simple characters. Special characters and national charactersare replaced in such a way that the text remains reasonably legible. The character set 1146> is used by default. In this case thefollowing replacements are made, for example: <225> ==> AE (AE) <257> ==> A (Acircumflex) <258> ==> Ae (Adieresis) <163> ==> L (sterling) Note that the new text can be longer than the old.The parameters: INTEXT> contains the text to be processed. The parameters passedmust be of TYPE C. Blank characters at the end of INTEXT are notprocessed. The result is written in OUTTEXT>. (TYPE C) The length of the output text is written in OUTUSED>. If OUTTEXTis longer, the rest is filled with SPACE. An 'X' is written in OUTOVERFLOW> if the output text did not fitin OUTTEXT. Otherwise space. With IN_CP> you can specify that the data in INTEXT> is notin the system character set, but is coded in the character setIN_CP>. If IN_CP differs from the current code page to such an extent that theblank charcters at the end of INTEXT may not be clearly recognized, youcan specify the number of bytes that are to be taken from INTEXT inINTEXT_LG >. (Caution: In Unicode systems the number of bytes isgreater than the number of characters.) With INTER_CP> you can specify another character set which is tobe used for the replacement. 1146> is the default. The function module makes use of the fact that 1146 is a sub-codepageof 1100. If you set a code page with INTER_CP that is neither asub-codepage of 1100 nor belongs to the same code page family as IN_CP,you can use INTER_BASE_CP > to specify the code page thatincorporates INTER_CP. If there are characters which do not occur in one or other of the twocharacter sets, they are replaced by a period (".>"). This can bechanged with the parameter REPLACEMENT>. An SAP character numbermust be specified. A 0> means that no replacements should bemade. In such a case, the exception CANNOT_CONVERT> is generated.EXCEPTIONS CANNOT_CONVERT> means that a character occured in the data thatcould not be replaced, and at the same time replacement was forbiddenby REPLACEMENT>. If you specify a character set that does not exist in IN_CP> orINTER_CP>, you get INVALID_CODEPAGE>. The system checks whether the two character sets are compatible (forexample, ASCII). Otherwise there is a CODEPAGE_MISMATCH>. If INTEXT> or OUTTEXT> is not of type C (text field), thefunction module cannot process them and generates aFIELDS_NOT_TYPE_C>. INTERNAL_ERROR> should never occur.Notes If you want only uppercase letters, you should first callSCP_REPLACE_STRANGE_CHARS and then TRANSLATE TO UPPER CASE. Example A umlaut ==> Ae ==> AE Further information RSCP0007> is a test harness. |