Re: Converting UTF-EBCDIC to UTF-8

2003-03-21 Thread Brian DePradine
### TESTS START $utf8_fe7f_upgraded = ord(A) != 0x41 ? pack('U*', 213, 190, 215) # EBCDIC \xef\xb9\xbf : pack('U*', 239, 185, 191); # ASCII \xef\xb9\xbf $utf8_fe7f_bytes = pack('C*', 239, 185, 191); print \x{fe7f} eq utf8_to_unicode($utf8_fe7f_upgraded) ? ok : not ok, 25\n; print \x{fe7f} eq

Re: Converting UTF-EBCDIC to UTF-8

2003-03-18 Thread Brian DePradine
Thank you for your report. I was careless about the trap on a non-ASCII platform like that (a eq \x61) is not true. So the failed tests are fixed, and some tests are added. Ver. 0.20 is available from there: [TAR-GZ, HTML-ized POD]

Re: Converting UTF-EBCDIC to UTF-8

2003-03-18 Thread SADAHIRO Tomoyuki
Thank you. I want to know what UTF8-flag-on string (SvUTF8(sv) is true) is equivalent with \xef\xb9\xbf, but I would misunderstand usage of pack('U*', LIST). Are numbers 256 in LIST Unicode code points or native ASCII/EBCDIC code points? Here is a draft of tests 25..28. I guess this should

Re: Converting UTF-EBCDIC to UTF-8

2003-03-17 Thread SADAHIRO Tomoyuki
Thank you for your report. I was careless about the trap on a non-ASCII platform like that (a eq \x61) is not true. So the failed tests are fixed, and some tests are added. Ver. 0.20 is available from there: [TAR-GZ, HTML-ized POD]

Converting UTF-EBCDIC to UTF-8

2003-02-20 Thread Brian DePradine
Hello, I am trying to work out the easiest way that I can coax perl to covert text from UTF-EBCDIC to UTF-8 and back. If anyone can provide some clue that would be greatly appreciated. Brian