diff --git a/harbour/ChangeLog b/harbour/ChangeLog index a588525963..488f4fded1 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,10 @@ The license applies to all entries newer than 2009-04-28. */ +2010-08-26 00:36 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/hbi18n2.prg + + __I18N_POTARRAYLOAD(): UTF8 BOM support + 2010-08-25 09:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/hbide.qrc + contrib/hbide/resources/r-landscape.png diff --git a/harbour/src/rtl/hbi18n2.prg b/harbour/src/rtl/hbi18n2.prg index 7a65e68e73..a26c435193 100644 --- a/harbour/src/rtl/hbi18n2.prg +++ b/harbour/src/rtl/hbi18n2.prg @@ -120,6 +120,10 @@ FUNCTION __I18N_POTARRAYLOAD( cFile, cErrorMsg ) cErrorMsg := "cannot read from file: " + cFile RETURN NIL ENDIF + /* Strip UTF-8 BOM */ + IF Left( cValue, 3 ) == e"\xEF\xBB\xBF" + cValue := SubStr( cValue, 4 ) + ENDIF IF !hb_eol() == _I18N_EOL cValue := strtran( cValue, hb_eol(), _I18N_EOL ) ENDIF