#57 Uni*File::ReadBom() used to check for unicode

closed-fixed
5
2008-06-22
2008-01-25
Kimmo Varis
No

There are several places in our code where Uni*File::ReadBom() is called and return value is used to check if the file is unicode. That is wrong, as unicode file can be without BOM.

We'll need new function to check for unicode and fix callsites that use Uni*File::ReadBom() for that.

Discussion

  • Kimmo Varis

    Kimmo Varis - 2008-06-22
    • assigned_to: nobody --> kimmov
     
  • Kimmo Varis

    Kimmo Varis - 2008-06-22

    Logged In: YES
    user_id=631874
    Originator: YES

    Attaching a patch.

    This patch adds new function:
    bool UniLocalFile::IsUnicode()

    which calls actual implemention class ReadBom() function to determine unicoding. This is mostly API cleanup now, it is a lot more natural to use IsUnicode() for checking unicode files than to use ReadBom().

    File Added: CheckUnicodeFiles.patch

     
  • Kimmo Varis

    Kimmo Varis - 2008-06-22

    Logged In: YES
    user_id=631874
    Originator: YES

    Committed the patch to SVN trunk:
    Completed: At revision: 5507

     
  • Kimmo Varis

    Kimmo Varis - 2008-06-22
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks