@Ascii (Formula Language)
Converts an LMBCS (Lotus® Multi-Byte Character Set) string to an ASCII string.
Syntax
@Ascii( string ) @Ascii( string ; [ALLINRANGE] )
Parameters
string
Text or text list. An LMBCS string.
[ALLINRANGE]
Keyword. Optional. Specifies that @Ascii should return a null string ("") if any characters in the original string cannot be represented by ASCII codes 32 to 127.
Return value
newString
Text or text list. The original string, with each character converted to an ASCII-compliant character. Any character that can't be represented by ASCII codes 32 to 127 is replaced with a question mark (?). If you specify [ALLINRANGE] and there are characters that can't be represented by ASCII codes 32 to 127, returns a null string ("").
Usage
If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
@Ascii first converts the string into ASCII-compliant characters, replacing any unrepresented characters with question marks, and then, if [ALLINRANGE] is True, checks for question marks within the string. This means that if the original string contains a question mark and [ALLINRANGE] is specified, a null string is returned even if the entire string can be represented by ASCII codes 32-127.
Examples
- This example returns Cue.
@Ascii( "Çüé" )
- This example returns Cue??.
@Ascii( "Çü飥" )
- This example returns Cue and Cue?? In a list.
@Ascii( "Çüé" : "Çü飥" )
- This example returns a null string ("") since the last 2 characters
can't be represented by ASCII codes 32 to 127.
@Ascii("Çü飥";[ALLINRANGE])
- This example returns Cue??; cat if field1 is a field containing
the text list "Çü飥";"cat."
@Ascii( field1 )