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

Basic UTF8 operations don't seem to work as advertised #1902

Closed
p5pRT opened this issue Apr 27, 2000 · 1 comment
Closed

Basic UTF8 operations don't seem to work as advertised #1902

p5pRT opened this issue Apr 27, 2000 · 1 comment

Comments

@p5pRT
Copy link

p5pRT commented Apr 27, 2000

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

Searchable as RT3172$

@p5pRT
Copy link
Author

p5pRT commented Apr 27, 2000

From benson@basistech.com

This should print out the numeric values of the Unicode characters specified
in $sushi. It does not. It also does not seem to be splitting into bytes.

I'm using the AS build 613 distribution.

use utf8;
use warnings;
use strict;

my $sushi = "\x{b36c}\x{5a8c}\x{ff5b}\x{5079}\x{505b}";

my @​charlist = split //, $sushi;
my $r;
foreach my $ch (@​charlist) {
  print ord($ch) . "\n";
  $r = $r . sprintf "U+%04X", ord($ch);
}

print $r . "\n"

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