bugGNU Octave - Bugs: bug #44006, The GUI editor makes wrong string...

 
 

bug #44006: The GUI editor makes wrong string quotes.

Submitted by:  None
Submitted on:  Wed 14 Jan 2015 08:54:30 PM UTC  
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Invalid Assigned to:  None
Originator Name:  Edwin de Koning Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  3.8.1
Operating System:  GNU/Linux

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

( Jump to the original submission)

Sat 17 Jan 2015 09:56:00 PM UTC, comment #7: 

No problem, thanks for verifying it was due to your keyboard layout settings.

When I change my keyboard settings to "English (US, international with dead keys)", I get the following behavior with the single/double quote key, which I think is the right behavior for this layout:

quote key followed by space: ' (single quote)
quote key twice: ´ (acute accent)
shift + quote key followed by space: " (double quote)
shift + quote key twice: ¨ (diaresis)

http://en.wikipedia.org/wiki/Dead_key

I see the same error message from Octave as you if I accidentally try to use one of these accent characters as a quote: invalid character ASCII 194.

Not sure why this didn't affect you the same way in other programs.

Mike Miller <mtmiller>
Project Administrator
Sat 17 Jan 2015 09:06:32 PM UTC, comment #6: 

My OS is Linux Mint Qiana with Cinnamon desktop and the keyboard layout is English (US, international with dead keys). I can't get those symbols the way you do it. Normally I use Geany as text editor and I have never had any problems with this.

But your comment did trigger me to try another keyboard layout. Since I don't use those dead keys or alternative keys anyway, I changed my keyboard layout to English (US). This is without the dead keys and now the problem has disappeared in the Octave GUI editor.

Thank you very much for your help and suggestions.

Anonymous
Fri 16 Jan 2015 01:52:05 AM UTC, comment #5: 

The particular code points is very revealing I think. I believe this may be due to some keyboard layout setting in your desktop environment and not anything that Octave's GUI is doing itself.

The code point 0xB4 is the character <´> (ACUTE ACCENT) and 0xA8 is the character <¨> (DIARESIS). With my keyboard layout, I can generate these by holding down the right Alt key and double pressing single quote or double quote.

Is it possible that your preferred keyboard layout and desktop settings are doing something to generate these symbols and input them into Octave? What are your desktop environment and keyboard layout? Do you get those symbols in a different desktop graphical editor?

Mike Miller <mtmiller>
Project Administrator
Fri 16 Jan 2015 01:41:40 AM UTC, comment #4: 

in case it's related, I've seen at least 1 time strange characters after a copy/paste ...BMcEachen 3.8.2/Windows

Anonymous
Thu 15 Jan 2015 08:39:54 PM UTC, comment #3: 

Another thing I would like to mention is that the ASCII code 194 that the command window says is not correct.
When I copy-paste the result into a ASCII to hex converter then it turns out that a single quote key stroke (0x27) becomes 0xB4 and a double stroke key stroke (0x22) becomes 0xA8.

Anonymous
Thu 15 Jan 2015 09:09:03 AM UTC, comment #2: 

Yes, the same key stroke results in different characters (but only with the string single quotes or double quotes). This happens within the same session and within the same document. There is no logic or control in it. Once it goes wrong, it goes wrong continuously, on every row. Then I am doing something else (usually I solve it by using copy-paste a correct string from another place to where I want it to be and then change the string content). And then some time later when I want to use a string again I simply try it and sometimes it works fine and sometimes not and I have to do the copy-paste trick again.

Anonymous
Thu 15 Jan 2015 05:54:35 AM UTC, comment #1: 

Thank you for the report. Does this mean that the same key results in different characters in the editor's text? Does this happen within the same session and/or within the same document?

Torsten Lilge <ttl>
Project Member
Wed 14 Jan 2015 08:54:30 PM UTC, original submission:  

When I am typing a string in the GUI editor, there is a 50% change that the string quotes are correct. I cannot detect any logic in it when they are right or wrong. In the Command Window they are always correct.

This is the result of a single quote string from the GUI editor (via copy-paste into the command window):

>> disp(´Hello´)

error: invalid character '�' (ASCII 194) near line 1, column 7
parse error:

  syntax error

>>> disp(´Hello´)

         ^

The same happens with a double quote string from the GUI editor (also via copy-paste to the command window):

>> disp(¨Hello¨)

error: invalid character '�' (ASCII 194) near line 1, column 7
parse error:

  syntax error

>>> disp(¨Hello¨)

         ^

You can immediately see that the quoting in the editor is going wrong due to the different shape of the quote symbols and the text color is not yellow but black.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by ttl (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-17 mtmiller StatusNeed Info => Invalid
        Open/ClosedOpen => Closed
    2015-01-16 mtmiller Item GroupNone => Incorrect Result
        StatusNone => Need Info

    Back to the top


    Powered by Savane 3.5