Skip to content

Commit

Permalink
next bugs in fpc version:
Browse files Browse the repository at this point in the history
-more visible "LANG"*_CHARSET  (we use it in mORMoti18n)
-bug in comment in  mORMoti18n (is it fpc bug ?)
  • Loading branch information
mariuszmaximus committed Jun 14, 2015
1 parent 488baf9 commit 1fd44e1
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 29 deletions.
2 changes: 1 addition & 1 deletion SQLite3/mORMoti18n.pas
Expand Up @@ -61,7 +61,7 @@
(if the ENHANCEDRTL conditional is not defined - see above)
- CR/LF consistent replacement (#13->'|', #10->'~')
uses ini-compatible plain text messages language file format (*.msg):
uses ini-compatible plain text messages language file format ( *.msg):
- Ansi, UTF8 or Unicode .msg files are translated into appropriate CharSet
- messages translations before first [FormName] section of .msg file
used for resourcestring and _()
Expand Down
54 changes: 26 additions & 28 deletions SynCommons.pas
Expand Up @@ -12638,6 +12638,32 @@ function SynLZCompressToBytes(P: PAnsiChar; PLen: integer;
/// uncompress a memory bufer using the SynLZ algorithm and crc32c hashing
function SynLZDecompress(const Data: TByteDynArray): RawByteString; overload;

{$ifdef LINUX}
const
ANSI_CHARSET = 0;
DEFAULT_CHARSET = 1;
SYMBOL_CHARSET = 2;
SHIFTJIS_CHARSET = $80;
HANGEUL_CHARSET = 129;
GB2312_CHARSET = 134;
CHINESEBIG5_CHARSET = 136;
OEM_CHARSET = 255;
JOHAB_CHARSET = 130;
HEBREW_CHARSET = 177;
ARABIC_CHARSET = 178;
GREEK_CHARSET = 161;
TURKISH_CHARSET = 162;
VIETNAMESE_CHARSET = 163;
THAI_CHARSET = 222;
EASTEUROPE_CHARSET = 238;
RUSSIAN_CHARSET = 204;
BALTIC_CHARSET = 186;
{$else}
{$ifdef FPC}
const
VIETNAMESE_CHARSET = 163;
{$endif}
{$endif}

resourcestring
sInvalidIPAddress = '"%s" is an invalid IP v4 address';
Expand Down Expand Up @@ -12698,7 +12724,6 @@ implementation
UTF8_EXTRA_SURROGATE = 3;
UTF8_FIRSTBYTE: array[2..6] of byte = ($c0,$e0,$f0,$f8,$fc);


{ TSynAnsiConvert }

const
Expand Down Expand Up @@ -25771,33 +25796,6 @@ function GetCaptionFromEnum(aTypeInfo: pointer; aIndex: integer): string;
GetCaptionFromPCharLen(tmp,result);
end;

{$ifdef LINUX}
const
ANSI_CHARSET = 0;
DEFAULT_CHARSET = 1;
SYMBOL_CHARSET = 2;
SHIFTJIS_CHARSET = $80;
HANGEUL_CHARSET = 129;
GB2312_CHARSET = 134;
CHINESEBIG5_CHARSET = 136;
OEM_CHARSET = 255;
JOHAB_CHARSET = 130;
HEBREW_CHARSET = 177;
ARABIC_CHARSET = 178;
GREEK_CHARSET = 161;
TURKISH_CHARSET = 162;
VIETNAMESE_CHARSET = 163;
THAI_CHARSET = 222;
EASTEUROPE_CHARSET = 238;
RUSSIAN_CHARSET = 204;
BALTIC_CHARSET = 186;
{$else}
{$ifdef FPC}
const
VIETNAMESE_CHARSET = 163;
{$endif}
{$endif}

function CharSetToCodePage(CharSet: integer): cardinal;
begin
case CharSet of
Expand Down

0 comments on commit 1fd44e1

Please sign in to comment.