#354 Invalid UTF-8 handling

Editor (234)
Bartosz Leper

When I include "use utf8;" in my UTF-8-encoded Perl source, Perl interpreter does not complain when executing the code. However, EPIC does indicate an error about malformed UTF-8 characters.

The invalid error notifications disappear after executing the file.

I'm using EPIC 0.4.25 with Eclipse 3.1, Windows XP (Polish version) and ActiveState Perl 5.8.8.


  • Bartosz Leper
    Bartosz Leper

    Example file that causes problems

  • Bartosz Leper
    Bartosz Leper

    Logged In: YES
    Originator: YES

    Another observation: the invalid error notifications actually disappear only in following scenario:
    1. The file is modified
    2. The file is saved (errors appear now if they weren't there previously)
    3. The user tries to execute the file.
    4. Eclipse pops up a dialog: Errors exists in the project (...) Continue launch?
    5. No matter what is the user's answer, invalid error notifications are gone.
    6. After closing the file and reopening it in the editor, the "errors" are back.

    It seems that cleaning the project removes the invalid error notifications and opening the file in the editor brings them back.

  • Jan Ploski
    Jan Ploski

    Logged In: YES
    Originator: NO

    Go to Help/About Eclipse SDK/Configuration Details and look for the file.encoding property. This is the character encoding which EPIC currently uses to transfer your source code to the "perl -c" process which performs syntax checking. AFAIK, you can set this default encoding for the entire Java virtual machine by starting Eclipse with additional command line arguments, such as:

    eclipse.exe -vmargs -Dfile.encoding=UTF-8

    This should work around your problem, though it might have undesired side effects elsewhere.

    The actual fix for this bug should make EPIC respect the encoding which can be specified for each text file in its Properties dialog. BTW, the problem does not seem to occur under Linux (no errors are displayed for your example).