From f80c3a9df0b716ab413e40d5f423df7e7478a9df Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 3 Jul 2015 20:35:12 +0000 Subject: [PATCH] fpspreadsheet: Fix string encoding error observed with fpc3 and non-UTF8RTL. git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4202 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/fpspreadsheet/xlsbiff8.pas | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/fpspreadsheet/xlsbiff8.pas b/components/fpspreadsheet/xlsbiff8.pas index e198cb07e..acc3ef211 100755 --- a/components/fpspreadsheet/xlsbiff8.pas +++ b/components/fpspreadsheet/xlsbiff8.pas @@ -1172,7 +1172,8 @@ var wideStr: widestring; begin wideStr := ReadWideString(AStream, HAS_8BITLEN); - Result := UTF8Encode(wideStr); +// Result := UTF8Encode(wideStr); // wp: this leads to string encoding error with fpc 3.0 (no UTF8RTL) + Result := UTF16ToUTF8(wideStr); end; procedure TsSpreadBIFF8Reader.ReadStringRecord(AStream: TStream);