Skip to content

Expose icu's FoldCase operation to user space #786

Closed
moritz opened this Issue Jun 8, 2012 · 4 comments

4 participants

@moritz
moritz commented Jun 8, 2012

Rakudo needs the FoldCase operation (see http://icu-project.org/apiref/icu4c/ustring_8h.html#ab6709b5a5c1606cf0d3ea24934d9acce ) to implement the fc() built-in subroutine. Exposing the FoldCase function from ICU as an op (preferred) or a method in the String PMC would help Rakudo here.

@pmichaud
Parrot Virtual Machine member
pmichaud commented Jun 8, 2012

When I looked at this, I wasn't sure if ICU's foldcase semantics matched the semantics desired by Perl 6.

Beyond that, we can always implement a foldcase opcode in NQP directly, rather than having to put it into Parrot. We already do something similar to access ICU's properties database -- see the "is_uprop" opcode in src/ops/nqp.ops of the nqp repository.

Pm

@Whiteknight Whiteknight added a commit that referenced this issue Jun 9, 2012
@Whiteknight Whiteknight Initial implementation of the foldcase operation for strings, in purs…
…uit of GH #786. moritz++ for the suggestion.
e0dd1ad
@Whiteknight

Two points:
1) I've put together a prototype of this new feature in the whiteknight/foldcase_str branch. It is completely untested (mostly because I don't understand it enough to put together a compelling test) but it's relatively straight-forward: Expose the u_strFoldCase function from ICU through the Parrot_str_foldcase function and the new "foldcase" op

2) Parrot does aim to provide a string system that fully supports unicode. Any ICU capabilities that Rakudo needs and Parrot doesn't yet provide should be provided by Parrot. Semantic mismatches are something we can deal with on a case-by-case basis (with a preference towards doing what Rakudo wants). If Parrot doesn't have an existing implementation to worry about we can put together whatever Rakudo wants.

@rurban rurban added a commit that referenced this issue Feb 15, 2016
@Whiteknight Whiteknight Initial implementation of the foldcase operation
for strings, in pursuit of GH #786. moritz++ for the suggestion.
ca0d742
@rurban
Parrot Virtual Machine member
rurban commented Feb 15, 2016

rebased to the branch smoke-me/foldcase_str and added some testcases. will merge into 8.2.0

@rurban rurban added a commit that referenced this issue Feb 15, 2016
@Whiteknight Whiteknight Initial implementation of the foldcase operation
for strings, in pursuit of GH #786. moritz++ for the suggestion.
c5d43e1
@rurban rurban added a commit that referenced this issue Feb 15, 2016
@Whiteknight Whiteknight Initial implementation of the foldcase operation
for strings, in pursuit of GH #786. moritz++ for the suggestion.
18b69b7
@rurban rurban added this to the 8.2.0 milestone Feb 15, 2016
@rurban rurban self-assigned this Feb 15, 2016
@rurban rurban added a commit that referenced this issue Feb 16, 2016
@Whiteknight Whiteknight Initial implementation of the foldcase operation
for strings, in pursuit of GH #786. moritz++ for the suggestion.
d36915e
@rurban rurban added a commit that referenced this issue Feb 16, 2016
@rurban rurban ChangeLog for foldcase GH #786 0829a8c
@rurban
Parrot Virtual Machine member
rurban commented Feb 16, 2016

Will be in 8.2.0, PBC_COMPAT bumped to 13.1

@rurban rurban closed this Feb 16, 2016
@rurban rurban added a commit that referenced this issue Feb 16, 2016
@rurban rurban ChangeLog for foldcase GH #786 94386e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.