You've already forked lazarus-ccr
TvPlanIt: Guess encoding of imported ical files and convert to utf8 if needed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@9091 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -5,7 +5,8 @@ unit VpICAL;
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, VpBaseDataFiles;
|
||||
Classes, SysUtils, LConvEncoding,
|
||||
VpBaseDataFiles;
|
||||
|
||||
type
|
||||
TVpICalendar = class;
|
||||
@ -194,7 +195,7 @@ type
|
||||
implementation
|
||||
|
||||
uses
|
||||
VpConst, VpMisc, VpBase;
|
||||
VpConst, VpBase;
|
||||
|
||||
const
|
||||
DATE_FORMAT = 'yyyymmdd';
|
||||
@ -1010,6 +1011,7 @@ var
|
||||
s: String;
|
||||
currEntry: TVpICalEntry = nil;
|
||||
oldEntry: TVpICalEntry = nil;
|
||||
enc: String;
|
||||
begin
|
||||
// Clear item list
|
||||
Clear;
|
||||
@ -1019,6 +1021,8 @@ begin
|
||||
s := AStrings[i];
|
||||
if s = '' then
|
||||
continue;
|
||||
enc := GuessEncoding(s);
|
||||
s := ConvertEncoding(s, enc, encodingUTF8);
|
||||
p := pos(':', s);
|
||||
if p = 0 then
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user