FPSDK Display non english letters from textfile
I have some german letters on screen text that are loaded from a textfile.
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:55John
Developer Center0 -
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).aspxIf 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.
John
Developer Center0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 786 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings