Modify

Opened 13 years ago

Closed 12 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 13 years ago.
Example code with comments

Download all attachments as: .zip

Change History (10)

by anonymous, 13 years ago

Example code with comments

comment:1 by guinness, 13 years ago

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 by guinness, 13 years ago

I would say it's a feature request more than anything.

Last edited 13 years ago by guinness (previous) (diff)

comment:3 by FireFox, 13 years ago

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

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

comment:4 by James, 13 years ago

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 by Jon, 13 years ago

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 by jchd18, 13 years ago

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

comment:7 by Jon, 13 years ago

Type: BugFeature Request

comment:8 by TicketCleanup, 13 years ago

Version: 3.3.8.1

Automatic ticket cleanup.

comment:9 by Jon, 12 years ago

Resolution: Rejected
Status: newclosed

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.