Modify

Opened 11 years ago

Closed 11 years ago

#2381 closed Feature Request (Rejected)

StringIsSpace - does not work in all cases

Reported by: mlipok Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: Cc:

Description

$s = Chr(160)
ConsoleWrite('$s =' & $s & '=' & @CRLF)
ConsoleWrite('StringIsSpace($s) = ' & StringIsSpace($s) & @CRLF)

Please see the attached file.
It contains an additional example that does not work well on the website, but works fine in the editor SciTE.

What is due to the different outcome measures CTRL + RIGHT ARROW

Attachments (1)

Test_AU3_3316_StringIsSpace.au3 (293 bytes) - added by anonymous 11 years ago.
Example code with comments

Download all attachments as: .zip

Change History (10)

Changed 11 years ago by anonymous

Example code with comments

comment:1 Changed 11 years ago by guinness

SRE doesn't even class Chr(160) as being a space either. So I don't know if this can be classed as a bug.

ConsoleWrite(StringRegExp(Chr(160), '^\s*$') & @CRLF)
ConsoleWrite(StringRegExp(Chr(32), '^\s*$') & @CRLF)

comment:2 Changed 11 years ago by guinness

SRE doesn't even class Chr(160) as being a space either. So I don't know if this can be classed as a bug.

ConsoleWrite(StringRegExp(Chr(160), '^\s*$') & @CRLF)
ConsoleWrite(StringRegExp(Chr(32), '^\s*$') & @CRLF)
Version 0, edited 11 years ago by guinness (next)

comment:3 Changed 11 years ago by FireFox

http://en.wikipedia.org/wiki/Non-breaking_space

Interesting, even the french version of the page is more complete.

comment:4 Changed 11 years ago by James

I think this is an issue of AutoIt's internal string handling. jchd would be best to speak to regarding this, he's up to date on how well AutoIt handles characters.

comment:5 Changed 11 years ago by Jon

The Remarks section says what characters are classed as space. You can use regexp with the \h and \v to match other sorts (\s just matches the same as the StringIsSpace function). More of a feature request really.

The horizontal space characters are:

U+0009 Horizontal tab
U+0020 Space
U+00A0 Non-break space
U+1680 Ogham space mark
U+180E Mongolian vowel separator
U+2000 En quad
U+2001 Em quad
U+2002 En space
U+2003 Em space
U+2004 Three-per-em space
U+2005 Four-per-em space
U+2006 Six-per-em space
U+2007 Figure space
U+2008 Punctuation space
U+2009 Thin space
U+200A Hair space
U+202F Narrow no-break space
U+205F Medium mathematical space
U+3000 Ideographic space

The vertical space characters are:

U+000A Linefeed
U+000B Vertical tab
U+000C Formfeed
U+000D Carriage return
U+0085 Next line
U+2028 Line separator
U+2029 Paragraph separator

comment:6 Changed 11 years ago by jchd18

I'm late here! It is as Jon says it is.

comment:7 Changed 11 years ago by Jon

  • Type changed from Bug to Feature Request

comment:8 Changed 11 years ago by TicketCleanup

  • Version 3.3.8.1 deleted

Automatic ticket cleanup.

comment:9 Changed 11 years ago by Jon

  • Resolution set to Rejected
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.