Re: "string is print" question
- From: "MartinLemburg@Siemens-PLM" <martin.lemburg.siemens-plm@xxxxxxx>
- Date: Tue, 23 Sep 2008 08:17:47 -0700 (PDT)
If I think that "print"able characters should include the newline
(physically a carriage return was in former times a newline), than I
should file a bug for "string is print" and an enhancement request for
its documentation, that it clarifies that the "print"able space class
is included, like alnum includes ascii.
I wouldn't ever think that the normal, common, old-fashioned "space"
is the only "space" class character accepted by the "print" class.
But we had just the discussion about extending "string trim(left|
right)?" to trim the whole UNICODE whitespace character set, which is
already recognized by "string is space".
No ... I don't think that I should file a bug against the
documentation. If the intention of "string is print" is to test
against "print"able characters, than "string is print" does not behave
right.
But ... what is really the intention of the "print" class?
Reading the "re_syntax" man page the "print" class is described as:
A "printable" (same as graph, except also including space).
So "graph" and "space" reference here other character classes.
Reading the "string is print" man page should be done the same or the
functionality should be the same ... including "space" character class
elements with the "print" character class, too!
Perhaps {1,} of the other core team members might clarify this
situation?
Best Regards,
Martin
On Sep 23, 4:21 pm, cla...@xxxxxxxxx (Cameron Laird) wrote:
In article <1771d827-e370-4359-999a-d7bc725db...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<oak...@xxxxxxxxxxxxxxxxxxxx> wrote:
On Sep 23, 7:08 am, "MartinLemburg@Siemens-PLM"
<martin.lemburg.siemens-...@xxxxxxx> wrote:
Hello,
using "string is print" caused some unexpected trouble ...
% string is print "Hello World!\nHallo Welt!"
0
% string is print "\n"
0
This behaviour is unexpected, because the documentation tells about
the "print" class:
"Any Unicode printing character, including space."
So ... "\n" is a space (string is space \"n" => 1), but "string print"
denies "\n" to be a space.
Shoud I file a bug?
Best regards,
Martin Lemburg
The way I interpret is that 'string is print' is any unicode printing
character and "*the* space character" not any unicode printing
character and "*any* space character". Admittedly the documentation
could be slightly less confusing in this regard.
So we're agreeing that Martin should file a bug against the documentation?
.
- Follow-Ups:
- LF vs CR (was: Re: "string is print" question)
- From: Ralf Fassel
- LF vs CR (was: Re: "string is print" question)
- References:
- "string is print" question
- From: MartinLemburg@Siemens-PLM
- Re: "string is print" question
- From: oakley
- Re: "string is print" question
- From: Cameron Laird
- "string is print" question
- Prev by Date: Re: "string is print" question
- Next by Date: Re: exec sed with special arguments
- Previous by thread: Re: "string is print" question
- Next by thread: LF vs CR (was: Re: "string is print" question)
- Index(es):
Relevant Pages
|