RobotStudio event

FPSDK Display non english letters from textfile







I have some german letters on screen text that are loaded from a textfile.
FP interface can not show i proberly. Is there a workarond when loading the textfile?
The interface is made in VS2008 with RAB 5.14.2
John Wiberg2012-04-10 13:04:55
Best Regards

Klaus Soenderhegn
www.cadalysator.dk

Comments




  • We used to have a FP SDK localization exercise, so that part used to work fine. Haven't tried it in a while though. Then the regular FlexPendant screens works fine, so actually displaying them should work.
     
    From back then I know that there was some magic with Microsoft chars not doing euro letters properly and you had to do something in the code for it to be displayed right. I'll do a search and see if I can find something.
     
    Do you have screenshots or a text sample so I can see which letters you are using. If you have your "parser" code snippet that would be nice as well.

    John Wiberg2012-04-10 13:03:55


  • Did a search and its probably a generic localization issue. There are lots of issues to run into regarding localization and text files.
    http://msdn.microsoft.com/en-us/library/dd318661(v=vs.85).aspx

    If I'd guess this should be due to the text being in a language seperate from the local settings of the computer/FlexPendant. So the behavior should be different on the virtual system vs the real FlexPendant etc.

    So a couple of things, you need to make sure that when you read the text from the file that you specify the standard to be used when reading it, for instance
    System.Text.Encoding.ANSI
    System.Text.Encoding.UTF8
    System.Text.Encoding.Unicode
    depending on which is used.

    You can see which was used for the file if you open the txt file with the notepad and look in the [SaveAS] dialog, at the bottom you'll see an [Encoding] dropbox. That is what it was encoded with when saved and you should use the same when opening it. (You can detect that dynamically as well).

    Then the other trap is Fonts. But there you should be fine as long as you use the ones defined by the FlexPendant because they all support "latin" characters, including Deutsch.