« Quay lại

How can I use special characters in AdoScript

Xem kết hợp Flat Xem Xem cây
Luồng thảo luận [ Trước | Tiếp theo ]
toggle
How can I use special characters in AdoScript
Câu trả lời
11:12 27/11/2017
Hi,
I am looking for an instruction or a command that allows to take into account the special characters of the French language. For example, in my AdoScript file, I want to set a string value ("Très Faible") to an attribute "Intensity". So I use this statement:
1CC "Core" debug SET_ATTR_VAL objid: (objId) attrname: "Intensity" val: "Very Low" as-string
But the value is not added and I have the following error:

 


Thank you
Đính kèm

Các đính kèm: Erreur.PNG (4,8k)

RE: How can I use special characters in AdoScript
adoscript
Câu trả lời
12:27 15/12/2017 gửi bài phản hồi tới Cho phép người dùng chưa đăng ký.
thanks for your question. It seems you have an issue on two ends here:
a) The AdoScript line provided in your post does not seem to correspond to the screenshot (val: "Very Low" as input, debug statement shows a different value). Is this a typo only?

b) Encoding of characters: looking at the screenshot it seems that on operating system level, the encoding is not correct to display non-unicode characters. You can check and find out in the Microsoft Windows Control Panel -> Regional Settings -> Advanced. In case you have this AdoScript code in a file, potentially the encoding of the file is not correctly set.


We have run tests here to verify that things operate - please find attached an example library, that contains a single class with an example attribute that contains French characters (Très Faible@Moyen@Très Bien)
These attribute values are used in the example at 3 different parts of the implementation:
i) as an attribute dependent graphical visualisation (see GRAPHREP Attribute dependent Visualisation FR.leo, also in the GRAPHREP of the class): the result is that dependent on the value selected in the notebook, the graphical visualisation (in this case fill color of the object) changes
ii) notebook representation: the characters are shown correctly in the notebook
iii) script interaction: the values can be set through AdoScript (see AdoScript_SET_ATTR_VAL.asc). This script selects the object with name "BAD" and sets the value to it.

Please find enclosed also the library and example model from the screenshot.
Đính kèm

Các đính kèm: AdoScript_SET_ATTR_VAL.asc (0,3k), Demo Library French ENUM Values.abl (9,6k), Demo Model French ENUM Values.adl (2,3k), GRAPHREP Attribute dependent Visualisation FR.leo (0,3k), View Model_Notebook.png (64,9k)