Umlaut--Success!

Devin Asay devin_asay at byu.edu
Fri Mar 2 10:35:59 EST 2007


Signe,

On Mar 2, 2007, at 1:33 AM, Signe.Sanne at roman.uib.no wrote:

> Good morning Devin
> I have still got no success (on Mac10.4.8 and Rev 2.6)
> The fld "result" is set to "verdana,unicode", but only n appears.  
> Could it be
> that I need Rev 2.8?

Indeed it does not work with Rev v. < 2.7. There were some  
enhancements to unicode for 2.7 that seem to be necessary to make  
this work.
>
> However, I have not tried your suggested settings with "Enable the  
> Unicode Hex
> Input method in the International system prefs under the input tab.  
> This will
> cause the Unicode Hex Input method to appear in the input menu (the  
> one with the
> little flags on the right side of the menubar.) First because my  
> system is in
> Norwegian and I did not find the input menu, and secondly because  
> my potential
> users cannot be bothered by doing this. (Or am I completely wrong?  
> Is this
> setting in Revolution somewhere?)

No, it's a Mac OS X setting. Open System Preferences, click on  
International, then Input Menu. As soon as you enable at least one of  
the items under Input Menu the input (flag menu, right next to the  
time on the right end of the menu bar) will become visible.

Do your users need to be able to type the n-with-umlaut into a field?  
If so, you could provide a button that inserted one, using the method  
I've described. If you decide to go that route I'd be happy to make a  
sample stack for you that does this.

Regards,

Devin
>
> Quoting Devin Asay <devin_asay at byu.edu>:
>
>>
>> On Mar 1, 2007, at 10:02 AM, Mark Schonewille wrote:
>>
>>> Hi Devin,
>>>
>>> This doesn't work for me (Mac OS X 10.4.8, Rev 2.7.8).
>>>
>>> The # is replaced by n instead of n-umlaut.
>>
>> Right, after I sent this message, I discovered that the first # in
>> the field does not get replaced by the n-umlaut, only an n. It works
>> for every other # after the first one. (Go figure!) Here's a
>> workaround that worked for me:
>>
>> on mouseUp
>>    get "#"&fld "poundfld"
>>    put numToChar(110) & numToChar(204) & numToChar(136) into tChars
>>    replace "#" with tChars in it
>>    set the unicodeText of fld "result" to uniencode(it,"UTF8")
>>    delete char 1 to 2 of fld "result"
>> end mouseUp
>>
>> Does this work for you?
>>
>> Thanks for keeping me honest!
>>
>> Devin
>>
>>>
>>>> Signe,
>>>>
>>>> You can still do it without one of these methods. Let's take your
>>>> case as an example. Say you have a field "poundfield" that
>>>> contains your text with # for each n-umlaut. Now create another
>>>> field, say field "result", and set its textFont to a unicode font
>>>> as in #1 of my first post, below. Now create a button with the
>>>> following script:
>>>>
>>>> on mouseUp
>>>>   get fld "poundfld"
>>>>   replace "#" with "nÃà" in it
>>>>   set the unicodeText of fld "result" to uniencode(it,"UTF8")
>>>> end mouseUp
>>>>
>>>> Barring any automatic Mac to PC character substitutions (by Rev or
>>>> by your mail client,) this should result in the #'s in your
>>>> poundfield being replaced by the character you want. If it doesn't
>>>> work as posted here, the three characters in the 'with' part of
>>>> the replace statement are ASCII-110 ASCII-204 ASCII-136. So you
>>>> could generate them reliably by doing this:
>>>>
>>>> on mouseUp
>>>>   get fld "poundfld"
>>>>   put numToChar(110) & numToChar(204) & numToChar(136) into tChars
>>>>   replace "#" with tChars in it
>>>>   set the unicodeText of fld "result" to uniencode(it,"UTF8")
>>>> end mouseUp


Devin Asay
Humanities Technology and Research Support Center
Brigham Young University




More information about the use-livecode mailing list