joraboy328
26th September 2010, 03:17
Dear all
How to define multibyte string variable and display it
for example:to display Chinese with function message?Would you give me the simple code on BaaNIVc4?

Thank you

rberti
27th September 2010, 18:26
Hi,

Maybe you could try funcition mb.display(), if is avaliable in BaanIV.


Syntax
long mb.display( string_expr, ref string substr$, long space [, long flags] )

Description
This returns that part of a specified string that fits in a specified display space. The substring is equal to the source string if the source string fits in the display space. If one or more characters do not fit in the display space, a ghost character (default is >) is appended to the substring.

Arguments
string_expr
The source string.

substr$
The returned substring. This ends with a ghost character if some characters of the source string do not fit in the specified display space.

space
The size of the display space for the substring.

flags
These optional flags specify certain criteria for handling the substring. They are particularly useful for working with bidirectional strings.

TSS_REVERSE


Reverse the substring if the current user environment is bidirectional and if string_expr contains bidirectional characters. The substring is ready for display.

TSS_FILLOUT
Fill the substring with trailing spaces, so that the width of the string equals the display space. This is the default if no flags are specified.

TSS_FORCE_REVERSE


Reverse the substring if string_expr contains bidirectional characters. The substring is ready for display.

TSS_FILTER_ESC
Filter out escape sequences.

TSS_FILTER_CF
Filter out code features.


Return values
An index to omitted characters if the string is truncated. Otherwise, the length of the string.

Context
Bshell function.



Regards,

Rafael