Actually the data is multibyte, so $utfdecode will do what I want. Thanks a lot smile