bugGNU Octave - Bugs: bug #38956, wrong value casting characters...

 
 

bug #38956: wrong value casting characters > 127 to integer types

Submitted by:  None
Submitted on:  Fri 10 May 2013 03:30:18 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Dave GoelOriginator Email: -unavailable-
Open/Closed: ClosedRelease: dev
Operating System: Any

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sat 05 Apr 2014 09:29:49 PM UTC, comment #3:

This is now fixed with the fix for bug #42054.

Mike Miller <mtmiller>
Project Member
Fri 21 Jun 2013 03:05:25 AM UTC, comment #2:

Confirmed:

Mike Miller <mtmiller>
Project Member
Fri 10 May 2013 03:37:33 AM UTC, comment #1:

Just to make things clear, it appears that in matlab `char (226)` actually gives a character â (or so a matlab user claims), but in Octave and Linux, `char (226)` gives me nothing.

Carnë Draug <carandraug>
Project Member
Fri 10 May 2013 03:30:18 AM UTC, original submission:

This happens for characters > 128.

octave:122> uint32(char(226))
ans = 0
octave:123> uint32(char(22))
ans = 22

(For comparison, replacing unit32 by double in the above ameliorates the situation.
I don't think this problme can be "explained away" by ascii's limitation to 128, but I could be wrong. This is char, not ascii, and again, double works whereas uint32 doesn't.)

Thanks.
Dave ("deego")

P.S.: carandraug reports that the bug persists in the devel version.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

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

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 05 Apr 2014 09:29:49 PM UTCmtmillerStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Sun 19 Jan 2014 07:26:46 PM UTCmtmillerCategoryNone=>Interpreter
      Item GroupNone=>Incorrect Result
      Release3.2.0=>dev
      Operating SystemGNU/Linux=>Any
      Summaryuint32 doesn\'t correctly cast some characters.=>wrong value casting characters > 127 to integer types
    Fri 21 Jun 2013 03:05:25 AM UTCmtmillerStatusNone=>Confirmed

    Back to the top


    Powered by Savane 3.1-cleanup