Hi,

Roie Marianer wrote:
>>   # This is what *should* happen:
>>   my $x = chr(0xE2)~chr(0x82)~chr(0xAC);
>>   say $x.bytes;  # 3
>>   say $x.chars;  # 1
>>
>>   # This is what currently happens:
>>   my $x = chr(0xE2)~chr(0x82)~chr(0xAC);
>>   say $x.bytes;  # 6
>>   say $x.chars;  # 3
> 
> That doesn't make sense. If you read the first statement "my $x=..."
> out loud, you'll see it says "character 0xE2, then character 0x82,
> then character 0xAC". Three characters. On the other hand,
> 
> my $x = chr(0x20AC); # Look ma, Unicode!
> say $x.bytes; #3
> say $x.chars; #1

ah! That makes perfect sense, thanks for clarifying matters! :)

Ok, then it seems we need to have a builtin, such that:
  new_builtin(0xE2) ~ new_builtin(0x82) ~ new_builtin(0xAC) eq
  "\xE2\x82\xAC"


--Ingo

-- 
Linux, the choice of a GNU | "The future is here. It's just not widely
generation on a dual AMD   | distributed yet." -- William Gibson  
Athlon!                    | 

Reply via email to