cscase
May 17th, 2014, 18:04
Hey all,
I'm trying to write an extension that translates to another language. Using a string file and textres= for this works great for most things, but my skill names all come over from a table in a lua script, and that seems to be a problem. If I just put diacritics directly in that script, they appear on the sheet as funny characters.
Okay, I thought, it's because I don't have the file encoded as UTF-8. So I switched the encoding, but then FG gave an error message that I interpreted to mean "I don't know how to properly read this file now."
So, next I tried manually using escape sequences in the lua script to get the special characters in. That, too, comes across as the same set of funny characters.
For skill names, because they are coming from a table in lua which is used to populate a windowlist, I can't just straight set a string resource for each skill. But is there a way to dynamically set the textresource for a control to use? Maybe I could do that with a script? I'm not seeing in the reference material a function like that, but maybe I am not looking in the right place.What is the best way to tackle this problem?
Thanks!
Scott
I'm trying to write an extension that translates to another language. Using a string file and textres= for this works great for most things, but my skill names all come over from a table in a lua script, and that seems to be a problem. If I just put diacritics directly in that script, they appear on the sheet as funny characters.
Okay, I thought, it's because I don't have the file encoded as UTF-8. So I switched the encoding, but then FG gave an error message that I interpreted to mean "I don't know how to properly read this file now."
So, next I tried manually using escape sequences in the lua script to get the special characters in. That, too, comes across as the same set of funny characters.
For skill names, because they are coming from a table in lua which is used to populate a windowlist, I can't just straight set a string resource for each skill. But is there a way to dynamically set the textresource for a control to use? Maybe I could do that with a script? I'm not seeing in the reference material a function like that, but maybe I am not looking in the right place.What is the best way to tackle this problem?
Thanks!
Scott