#724: [bug] Parrot fails numeric conversion of ucs2 strings
----------------------+-----------------------------------------------------
Reporter: pmichaud | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: core | Version: 1.2.0
Severity: medium | Resolution: fixed
Keywords: | Lang:
Patch: | Platform:
----------------------+-----------------------------------------------------
Comment(by pmichaud):
Reopening ticket -- bacek has already reverted the r39287 patch. r39287
suffered from two problems -- (1) it caused strings containing non-ascii
characters to throw an exception on numification (an API change), and (2)
every string-to-number conversion for non-ASCII strings would result in
creation of another gc-able object.
Here's a regression test that catches the first issue (and that fails in
r39287):
{{{
.sub 'main'
$S0 = unicode:"140 r\x{e9}sum\x{e9}s"
$N0 = $S0
say $N0
$I0 = find_encoding 'ucs2'
$S0 = trans_encoding $S0, $I0
$N0 = $S0
say $N0
.end
}}}
Pm
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/724#comment:2>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets