Converts a text string from its original encoding to UTF8. This function can be used within a ShowUTF8, ShowUTF8Left, a ShowUTF8Right, and a ShowUTF8Center procedure.
maputf8( text, encoding, reversedmapping )
text
Static text string or data selection to be converted.
encoding
String identifying the original encoding or reference to a style defined in the document that identifies the original encoding.
reversedmapping
Boolean specifying whether the text to be converted should be mapped in regular or reversed order. Possible values are true (reversed mapping) and false (no reversed mapping). In the case of preformated Arabic data, this argument should be set to false.
The following Arabic original encodings are supported for the conversion process:
|
AL-ARABI |
ASMO-708 |
ASMO-708-UNIX |
IBM-864 |
ISO-8859-6 (Arabic) |
|
ASMO-449+ |
ASMO-708+ |
HP-ARABIC8 |
IRAN SYSTEM |
MS-CP-1256 |
Example 1 illustrates a variable text string that is taken from the data, converted from the MS-CP-1256 encoding to UTF8 and then displayed from the insertion point to the right. Example 2 illustrates the same variable text string, but this time it is converted from the encoding specified in the style named “MyArabEncoding” to UTF8.
setlinewidth(0.007)
moveto(0,0)
rlineto(&width,0)
rlineto(0,&height)
rlineto(neg(&width),0)
rlineto(0,neg(&height))
closepath()
stroke()
moveto(&width/2,&height/2)
SetStyleExt(&Style1,12.0000,0,[100],100)
showUTF8right(maputf8(@(2,15,35), 'MS-CP-1256', False),'normal')
setlinewidth(0.007)
moveto(0,0)
rlineto(&width,0)
rlineto(0,&height)
rlineto(neg(&width),0)
rlineto(0,neg(&height))
closepath()
stroke()
moveto(&width/2,&height/2)
SetStyleExt(&Style1,12.0000,0,[100],100)
showUTF8right(maputf8(@(2,15,35), &MyArabEncoding, False),'normal')