New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make lone No
category type characters in Str convert to Int properly
#5226
Comments
From @zoffixznetThere are numerous No characters that may be entered, say, by a user being asked for numeric input: http://www.fileformat.info/info/unicode/category/No/list.htm However, Rakudo will fail to convert it into an Int, due to it not being a digit: <ZoffixWin> m: say '௰'.Int I think from the programmer's point of view, it should be expected that the conversion should succeed, where it makes sense. Since the same character can be used bare and work: <ZoffixWin> m: say ௰ |
From @lizmatFixed with 1cb2e8d9e71797f576b3
|
The RT System itself - Status changed from 'new' to 'open' |
From @zoffixznetThanks. I noticed this didn't make things like '௰' + 10 work and went to fix it and noticed val() too did not handle "No" chars. And then TimToady ruled that val()/Str.Int/Str.Numeric should NOT handle No chars. If the programmer really needs such a feature, they should explicitly be using unival(). Relevant IRC conversation: http://irclog.perlgeek.de/perl6/2016-07-04#i_12782986 PR to undo the handling of No chars in Str.Int: rakudo/rakudo#808 And for the aforementioned reasons this ticket is rejected. |
@zoffixznet - Status changed from 'open' to 'rejected' |
From @zoffixznetTests added in Raku/roast@6c01b3fdbf |
Migrated from rt.perl.org#127866 (status was 'rejected')
Searchable as RT127866$
The text was updated successfully, but these errors were encountered: