Re: convert decimal to hexidecimal

2002-08-28 Thread Paul Tremblay
On Wed, Aug 28, 2002 at 09:51:11PM -0700, Randal L. Schwartz wrote: > Why?   ♠ is prefectly valid, unless you're talking about > something besides XML or HTML. > > -- Yes, it certainly is! I realized this as soon as I sent off the email. Most of RTF (I am writing a script to convert RTF to XML

Re: convert decimal to hexidecimal

2002-08-28 Thread Randal L. Schwartz
> "Paul" == Paul Tremblay <[EMAIL PROTECTED]> writes: Paul> Is there a way to convert a decimal number to a hexidecimal number in Paul> perl? Paul> I have expressions like this: Paul> \u8195\'20 Paul> \u9824\'3f Paul> The number after the u is a decimal number that needs to be converted P

Re: convert decimal to hexidecimal

2002-08-28 Thread chris
my $var = "\\u8195\\'20"; if ($var =~ /^\\u(.*)\\/){ print '&#x' . sprintf("%x", $1 . ';'); } On Wed, 28 Aug 2002 20:44:32 -0400, [EMAIL PROTECTED] (Paul Tremblay) wrote: >Is there a way to convert a decimal number to a hexidecimal number in >perl? > >I have expressions like this: > >\u8195\

Re: convert decimal to hexidecimal

2002-08-28 Thread Steve Grazzini
Paul Tremblay <[EMAIL PROTECTED]> wrote: > Is there a way to convert a decimal number to a hexidecimal > number in perl? $ perldoc -f sprintf > I have expressions like this: > > \u8195\'20 > \u9824\'3f > > The number after the u is a decimal number that needs to be > converted to hexidecai

Re: convert decimal to hexidecimal

2002-08-28 Thread John W. Krahn
Paul Tremblay wrote: > > Is there a way to convert a decimal number to a hexidecimal number in > perl? > > I have expressions like this: > > \u8195\'20 > \u9824\'3f > > The number after the u is a decimal number that needs to be converted > to hexidecail. The number after the second slash need

convert decimal to hexidecimal

2002-08-28 Thread Paul Tremblay
Is there a way to convert a decimal number to a hexidecimal number in perl? I have expressions like this: \u8195\'20 \u9824\'3f The number after the u is a decimal number that needs to be converted to hexidecail. The number after the second slash needs to simply be elimianted. Thus, the two li