in reply to Re: help needed in unicode retriving
in thread help needed in unicode retriving

but still its giving the wrong answer, substr $target,0,2 it returns only one chinese character , but how to get two chinese characters

Replies are listed 'Best First'.
Re^3: help needed in unicode retriving
by wazoox (Prior) on Mar 10, 2006 at 12:48 UTC
    Sorry, my mistake, actually use utf8; should do the trick, see the update to my previous message.
      i tried both, but still the same problem . do we need to use encode . if so can you give me one example which using the encode stuff.
        Hummmpf, I don't understand what's wrong. Please try
        print utf8::is_utf8($your_string);
        To check if your string is well formed utf8 from perl's point of view... It would be nice to test with only a few line of code, and to show us what's your data and code like.