adelyte / crescendo-for-crestron

Crescendo Framework for Crestron control systems.
https://www.adelyte.com/crestron/crescendo
Other
77 stars 26 forks source link

Is Crescendo able to support multi-bytes language,such as Chinese? #83

Closed xielong87 closed 6 years ago

xielong87 commented 6 years ago

Really nice work you guys have done! I'm trying to get used to Crescendo, and planning to use it in my next project. The issue I am facing is that, is Crescendo able to support multi-bytes language,such as Chinese, for both 2-series and 3-series processors? Thanks!

xie from China.

adelyte-austin commented 6 years ago

Thank you @xielong87.

Crestron has created Answer ID 4510 to answer this question. It looks like the instructions for indirect text apply to 2series and 3series processors.

Does Crestron support Multi-Byte Fonts and International Font support?

Most languages use a single byte of 8 bits to represent a character, e.g. English, French, Spanish, German, Hebrew, Russian, Thai, etc. Multibyte character fonts require more than the usual 8 bits to specify a character. This occurs when a language has more than 256 characters (28) in a font. For example, Chinese fonts contain several thousand characters, you need a Chinese operating system in order to use Chinese characters. Just loading the font will not work. Other multibyte languages include Japanese and Korean.

Note: Multibyte International characters are supported on all Touchpanels except: eControl 2 XPanels TPMC-10 UPX, and UPX-2-MSO

There are two separate issues with multibyte characters

Core 3 UI: For Core 3 UI panels, all multibyte characters must be entered using Unicode (UTF-16). UTF-16 must be used for both static and indirect text strings.

Note: Only single byte characters may be used for page names, project names, and image files.

Static text on an object, entered in the standard way in VT Pro-e, always works under Windows 98. Under Windows XP, you must use VT Pro-e 3.0 or later. Indirect text on an object is entered in VT Pro-e and the actual string to be displayed is entered in SIMPL Windows. You must use VT Pro-e 3.0 or later to guarantee that the full set of characters in the font is stored on the Touchpanel. You must use SIMPL Windows 2.03.11 or later to enter Chinese characters directly. As of this publication date, only completely single byte or completely multibyte strings may be entered or they will not be compiled correctly in SIMPL Windows. In other words, you cannot enter Chinese characters interspersed with numbers. You can enter Chinese characters or numbers in separate strings. Crestron is scheduling time to fix this in the near future and the release notes for SIMPL Windows will mention it. Of course, you can always use the workaround of showing a graphic that displays the string, but it is not dynamic.

If using the Indirect Text Method Use the SimplWindows symbol, [Send As Raw Data] to send the text to a Touchpanel from a SimplWindows program typically driven by a Serial IO or Serial Send. Speedkey name, RAW Note: Old symbol name, [Send As Unicode Text], Speedkey names sau, unicode

Serial inputs: through Note: Converts the corresponding serial data to Unicode for transmission to a touchpanel.

Can enter the text to be displayed in the Serial IO/ Serial Send by entering the hex value as: \xHH where HH represents the hex value of the character to send. Can also enter the text with a press of the [Alt] and entering in the decimal equivelent of the character and then releasing the [Alt] key. For example to display the character, ñ In the Serial IO center text field, Press/ Hold [ALT] key, "1", "6", "4" release the [Alt] key, the " ñ " should display in the Serial IO and then to the Touchpanel

If the VisionTools Pro-e project is using a Unicode font (i.e., Chinese) in an indirect text field, this Serial Join number should be connected to the corresponding <text-o#> input of the SimplWindows Touchpanel symbol. This will enable the control system to send out the data in the proper format to the panel.

Note: If a particular string is attached to more than one panel and the Send as Unicode symbol, the string will be sent as Unicode to BOTH panels.

xielong87 commented 6 years ago

@adelyte-austin thanks so much! you reply so fast. I'll see if i can get it work.

adelyte-chris commented 6 years ago

If you can’t, we’re happy to work with you. Either way, please report back.

On Fri, Feb 23, 2018 at 6:29 PM, xielong87 notifications@github.com wrote:

@adelyte-austin https://github.com/adelyte-austin thanks so much! you reply so fast. I'll see if i can get it work.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/adelyte/crescendo/issues/83#issuecomment-368168950, or mute the thread https://github.com/notifications/unsubscribe-auth/AGkRZBJzL6A_4qRE5bZzg5_IYbZtj2j2ks5tX0nlgaJpZM4SQ9kW .

xielong87 commented 6 years ago

@adelyte-chris I did some simple test as Answer ID 4510 told,but it seems not work as expected.

For example, I want to display the Chinese word "谢“ on the crestron app touchpanel.

First,I created a vtp project with international theme ,then created a main page ,and draw a "Formatted Text" object on the page and assign an indirect text join number(1) to it.

Then, I created a Simpl Windows project ,and use a "Serial Send" to send the UTF16_LE code of "谢”, the code is "\x22\x8C", and route the signal to both "Send As Raw Data" and Crestron App touchpanel serial fb "text-o1". Compile and upload the project, things not go as expected :(.

I also tried to send the code "\xFF\xFE\x22\x8C" and "\x8C\x22",failed also.

I then try to search some information on google ,I saw some topic on Reddit Crestron Group about crestron multibyte language display. People mentioned Crestron Answer ID 4510 and 5264, I don't have permission to access 5264, Can you help me to get the page? Thanks!

Sorry, my English is not good. Thanks for your patience on me :D.

Best Wishes!

adelyte-austin commented 6 years ago

@xielong87 The access level is to Answer ID 5264 is Privileged. You should email Crestron and request access to support.crestron.com content. There is a demo program and UI attached to the answer that you will also want. Let us know if that outreach is successful or not.