Re: python tr equivalent (non-ascii)

2008-08-13 Thread kettle
On Aug 13, 5:33 pm, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > kettle wrote: > > I was wondering how I ought to be handling character range > > translations in python. > > > What I want to do is translate fullwidth numbers and roman alphabet > > characters into their halfwidth ascii equivalents.

Re: python tr equivalent (non-ascii)

2008-08-13 Thread Fredrik Lundh
kettle wrote: > I was wondering how I ought to be handling character range > translations in python. > > What I want to do is translate fullwidth numbers and roman alphabet > characters into their halfwidth ascii equivalents. > In perl I can do this pretty easily with tr: > > tr/\x{ff00}-\x{f

Re: python tr equivalent (non-ascii)

2008-08-13 Thread kettle
On Aug 13, 5:18 pm, kettle <[EMAIL PROTECTED]> wrote: > Hi, > I was wondering how I ought to be handling character range > translations in python. > > What I want to do is translate fullwidth numbers and roman alphabet > characters into their halfwidth ascii equivalents. > In perl I can do this

python tr equivalent (non-ascii)

2008-08-13 Thread kettle
Hi, I was wondering how I ought to be handling character range translations in python. What I want to do is translate fullwidth numbers and roman alphabet characters into their halfwidth ascii equivalents. In perl I can do this pretty easily with tr: tr/\x{ff00}-\x{ff5e}/\x{0020}-\x{007e}/;