'strings' in mavericks broken

133 views
Skip to first unread message

Brendan Miller

unread,
Mar 22, 2014, 7:48:22 PM3/22/14
to f-sc...@googlegroups.com
In the f-script workspace if I try to type a string:

'mystring'

The ' characters get replaced with ’. This is a unicode right single quotation mark: http://www.fileformat.info/info/unicode/char/2019/index.htm

This causes a "syntax error: Non ASCII character detected, character 0".

Whatever widget that accepts input doesn't seems to be doing transformations like you would with a word processor, i.e. turning ascii quotes into unicode directional quotes.

I'm also wondering, if f-script still maintained? The version on the website didn't work, and I had to get a link from this forum... Could someone at least put a link to the correct version on the website so that every new person isn't confused?

Brendan

Philippe Mougin

unread,
Mar 26, 2014, 5:51:33 AM3/26/14
to f-sc...@googlegroups.com


Le dimanche 23 mars 2014 00:48:22 UTC+1, Brendan Miller a écrit :
In the f-script workspace if I try to type a string:

'mystring'

The ' characters get replaced with ’. This is a unicode right single quotation mark: http://www.fileformat.info/info/unicode/char/2019/index.htm

This causes a "syntax error: Non ASCII character detected, character 0".


To fix this (and other stuff) you can add the following method in FScriptTextView.m:

- (id)initWithFrame:(NSRect)frameRect textContainer:(NSTextContainer *)aTextContainer
{
    self = [super initWithFrame:frameRect textContainer:aTextContainer];
    if (self)
    {
        [self setAutomaticDashSubstitutionEnabled:NO];
        [self setAutomaticQuoteSubstitutionEnabled:NO];
    }
    return self;
}
 

I'm also wondering, if f-script still maintained? The version on the website didn't work, and I had to get a link from this forum... Could someone at least put a link to the correct version on the website so that every new person isn't confused?

Good idea. Will do that.

Philippe

Paul Horth

unread,
Apr 16, 2014, 2:44:25 PM4/16/14
to f-sc...@googlegroups.com
Philippe,

As a complete beginner with F-script I was a bit confused when the example myScript:='hello' didn't work.

But your code fixed it perfectly! Thanks.

Also, I found a temporary fix if people aren't confident with Xcode or don't have it:

You can you the view button on the browser, click on the F-script window, go back to the browser, search for quote,
click on setAutomaticQuoteSubstitutionEnabled: and type in NO and send message.
Reply all
Reply to author
Forward
0 new messages