kepler has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I have a databese in UTF-8 code. There are caracters that Perl does not know how to read. And I want to exclude them. The database has lines. How can I exclude the lines that have such caracters? If I try to copy the squared symbol, it gives the ? symbol. Regards, Kepler

Replies are listed 'Best First'.
Re: UTF-8 problem
by John M. Dlugosz (Monsignor) on May 18, 2011 at 19:07 UTC
    Perl handles UTF-8 characters just fine.

    How is the database content being brought into the program? Maybe the problem lies there.

    As for "copying" the squared symbol (² ?), that's available in Latin-1, and you may be talking about the text editor you are writing your code in, not Perl itself.

    You can use \x and \N escape sequences to refer to characters in your program that you can't include in the file (or don't want to).

Re: UTF-8 problem
by ww (Archbishop) on May 18, 2011 at 22:56 UTC
    - -
    1. Same old question. See Super Search
    2. Lack of sufficient info to respond specifically
    3. Spelling.