#1 2016-07-22 17:43:52

Warpedone
Member
Registered: 2016-07-22
Posts: 3

SynCommons: Bugfix - active codepage

I'm using Windows 10, Delphi 7, codepage 1250 and SQLite.
Some of our special characters did not show up right, so I dig into the code and found/fix two bugs.

File: SynComons, version 1.18, date 2016-07-19_091339_73271568b4

1.
line

WinAnsiConvert := TSynAnsiConvert.Engine(CODEPAGE_US) as TSynAnsiFixedWidth;

should be

WinAnsiConvert := TSynAnsiConvert.Engine(GetACP) as TSynAnsiFixedWidth;

2.
line

djWinAnsi:  AddAnyAnsiString(PRawByteStringArray(P)^[i],twJSONEscape,CODEPAGE_US);

should be

djWinAnsi:  AddAnyAnsiString(PRawByteStringArray(P)^[i],twJSONEscape,GetACP);

Awesome library and work!

Best regards,
Dean

Offline

#2 2016-07-22 17:50:18

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,622
Website

Re: SynCommons: Bugfix - active codepage

I do not think so.

WinAnsiConvert engine is for the CODEPAGE_US=1252=WinAnsi code page, by definition...

Offline

Board footer

Powered by FluxBB