IEnvironment.CodeUTF8String
IEnvironment
function CodeUTF8String(Const AString: WideString; addPrefix: WordBool): WideString;
Type Library
TeeChartx
Description
TeeChart Unicode version only.
Codes input text to UTF8 format for internal TeeChart use. Could be used to prepare input text to be stored in ascii format for later rendering as Unicode characters.
TeeChart tags UTF8 strings with the prefix: "@U#". The addPrefix parameter when true adds the prefix to the generated string.
Example
Dim strings
'generate UTF strings. Typically strings stored in this way would be from non-latin
'charactersets not supported on all Windows machines.
strings = Array(TChart1.Environment.CodeUTF8String("morning", True), _
TChart1.Environment.CodeUTF8String("midday", True), _
TChart1.Environment.CodeUTF8String("afternoon", True), _
TChart1.Environment.CodeUTF8String("evening", True), _
TChart1.Environment.CodeUTF8String("night", True))
With TChart1.Series(0)
.Clear
.AddXY 0, 3, strings(0), clTeeColor
.AddXY 1, 5, strings(1), clTeeColor
.AddXY 2, 4, strings(2), clTeeColor
.AddXY 3, 4, strings(3), clTeeColor
.AddXY 4, 5, strings(4), clTeeColor
End With
An example thus, with sample Japanese strings:
' 'japanese charset not globally supported in VB designtime environment
With TChart1.Series(0)
.Clear
.AddXY 0, 3, "@U#E4B88AE3818BE38289E4B88BE381B8", clTeeColor
.AddXY 1, 5, "@U#E58FB3E3818BE38289E5B7A6E381B8", clTeeColor
.AddXY 2, 4, "@U#E5B7A6E3818BE38289E58FB3E381B8", clTeeColor
.AddXY 3, 4, "@U#E58FB3E4B88BE99A85E3818BE38289", clTeeColor
End With