NotFound
2008-06-23 16:50:16 UTC
# New Ticket Created by NotFound
# Please include the string: [perl #56262]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=56262 >
The chr opcode is documented in docs/ops/string.pod as:
chr(out STR, in INT)
The character specified by codepoint integer $2 in the
current character set is returned in string $1.
But the implementation just calls string_chr, which return a string
ascii, iso_8859_1 or utf8 depending on the codepoint value.
If we change that, we break some code, like
examples/shotout/mandelbrot.pir, that seems to expect that the result
will always be a string with just a byte with the numeric value of his
argument for every 0-255 value.
Maybe we need another opcode, or a way to tell the desired character
set and encoding.
# Please include the string: [perl #56262]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=56262 >
The chr opcode is documented in docs/ops/string.pod as:
chr(out STR, in INT)
The character specified by codepoint integer $2 in the
current character set is returned in string $1.
But the implementation just calls string_chr, which return a string
ascii, iso_8859_1 or utf8 depending on the codepoint value.
If we change that, we break some code, like
examples/shotout/mandelbrot.pir, that seems to expect that the result
will always be a string with just a byte with the numeric value of his
argument for every 0-255 value.
Maybe we need another opcode, or a way to tell the desired character
set and encoding.
--
Salu2
Salu2