Skip to content
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

Unicode character from name #5475

Closed
p6rt opened this issue Jul 23, 2016 · 5 comments
Closed

Unicode character from name #5475

p6rt opened this issue Jul 23, 2016 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Jul 23, 2016

Migrated from rt.perl.org#128706 (status was 'resolved')

Searchable as RT128706$

@p6rt
Copy link
Author

p6rt commented Jul 23, 2016

From @ajs

I have a name in a scalar of a unicode codepoint. I want to get the
codepoint number or character. It looks like there's no way to do that
other than eval​:

$ perl6 -e 'my $name = "COMMA"; say "qq\{\\c[$name]}".EVAL'
,

From IRC​:

[14​:51] <AlexDaniel> what a good question
[14​:51] <timotimo> i exposed the nqp op for the lookup i think
[14​:52] <timotimo> but i didnt want to decide on the p6 function name
[14​:52] <AlexDaniel> harmil​: rakudobug it
[14​:53] <harmil> okay
[14​:53] <AlexDaniel> m​: say “\c[PILE OF POO]”.uniname
[14​:53] <evalable> AlexDaniel​: |«HEAD»​: PILE OF POO
[14​:54] == autarch [~autarch@​173-11-48-49-Minnesota.hfc.comcastbusiness.net]
has joined #perl6
[14​:55] <timotimo> codepointffromname
[14​:55] <timotimo> is the name of tge nqp op
[14​:55] <timotimo> one less f

Version info​:

$ perl6 -v
This is Rakudo version 2016.07.1-34-ge5c909c built on MoarVM version
2016.07-3-gc01472d
implementing Perl 6.c.

--
Aaron Sherman, M.​:
P​: 617-440-4332 Google Talk, Email and Google Plus​: ajs@​ajs.com
Toolsmith, developer, gamer and life-long student.

@p6rt
Copy link
Author

p6rt commented Jul 23, 2016

From @pmichaud

On Sat Jul 23 11​:57​:17 2016, ajs wrote​:

I have a name in a scalar of a unicode codepoint. I want to get the
codepoint number or character. It looks like there's no way to do that
other than eval​:

$ perl6 -e 'my $name = "COMMA"; say "qq\{\\c[$name]}".EVAL'
,

From IRC​:

[14​:51] <AlexDaniel> what a good question
[14​:51] <timotimo> i exposed the nqp op for the lookup i think
[14​:52] <timotimo> but i didnt want to decide on the p6 function name
[14​:52] <AlexDaniel> harmil​: rakudobug it

This is more properly a Perl 6 language issue ("how do I convert a unicode name to a codepoint?") than a Rakudo one, so it probably belongs in a different ticket queue somewhere.

Perhaps file an issue ticket in https://github.com/perl6/specs/issues .

Pm

@p6rt
Copy link
Author

p6rt commented Jul 23, 2016

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Mar 20, 2017

From @samcv

This has been resolved now. The routine and method are called `parse-names` and has a docs page here​:

https://docs.perl6.org/routine/parse-names

Marking this as resolved.

@p6rt
Copy link
Author

p6rt commented Mar 20, 2017

@samcv - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant