problems with Cyrillic input on Windows standalone
Devin Asay
devin_asay at byu.edu
Mon Jan 26 11:06:39 EST 2009
Hi Curt,
I've been mostly offline this weekend, so didn't see this until now.
The problem is that to type non-Western European text in a Rev field,
you are dependent upon the proper input method for the OS being
chosen, a process that is not entirely under Rev's control. I
struggled with this very issue a few years back, and finally came up
with this solution, which seems to be fairly reliable.
In the field I want to type into, I had a preliminary, informational
text message, something like "Click here to type Russian." In the
field's script I put the following handlers (edited to eliminate the
irrelevant bits):
on selectionChanged
doStartTypingStuff
end selectionChanged
on doStartTypingStuff
select the text of me
# the following font custom props are nothing special,
# Verdana for Mac and Arial for Windows
if the platform is "MacOS" then
put the macFont of this stack into tFont
else
put the winFont of this stack into tFont
end if
set the textFont of the selectedChunk to (tFont&",russian")
put empty into me
end doStartTypingStuff
I just tested this on my OS X and Win XP boxes and it still seems to
work. Of course, as I said, it's dependent upon your system having
both the fonts and keyboard layouts installed for the language in
question. Then of course the user has to know the proper key
assignments to type successfully, but that's another story.
HTH
Devin
On Jan 24, 2009, at 10:53 AM, Curt Ford wrote:
> I'm using Rev 3.0 on a Mac for a project includes a field that users
> should be able to type into in Russian. Until recently this worked
> fine in Windows standalones but in recent builds, typing with the
> Russian keyboard selected gives gibberish (numbers & symbols like :>B;
> 5BO) instead of Russian in the Windows standalone only. The textFont
> of the field is "Arial."
>
> To isolate the problem I made a separate stack with just a card & a
> field with textFont set to Arial, textSize 18. This worked fine for
> Russian in a Windows standalone.
>
> I tried copying this working field into my project without changing
> anything about the field; its textFont was still Arial. When I tried
> this is a Windows standalone, typing in Russian gave gibberish again.
>
> I can't find anything in the card script that affects the fields of
> this card. In the stack script I do have
>
> if the platform = "Win32" then
> set the textfont of this stack to "Arial"
> set the textsize of this stack to 14
> --but don't make the pulldowns too big on Windows!
> set the textsize of group "Menubar" to 12
> else if the platform = "MacOS" then
> set the textfont of this stack to "Lucida Grande"
> set the textSize of this stack to 12
> end if
>
> But pasting this into the stack script of the separate stack didn't
> cause a problem in the Windows standalone.
>
> Any ideas what's going on here, or what to look at?
>
> -Curt
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
Devin Asay
Humanities Technology and Research Support Center
Brigham Young University
More information about the use-livecode
mailing list