mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-29 20:20:16 +02:00
* Use default functions if call to iconv_open failed
git-svn-id: trunk@14352 -
This commit is contained in:
parent
255c14fc4d
commit
90ddd046bc
@ -181,6 +181,11 @@ procedure Wide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
|
||||
my0 : size_t;
|
||||
err: cint;
|
||||
begin
|
||||
if PtrInt(iconv_wide2ansi)=-1 then
|
||||
begin
|
||||
DefaultUnicode2AnsiMove(source,dest,len);
|
||||
exit;
|
||||
end;
|
||||
mynil:=nil;
|
||||
my0:=0;
|
||||
{ rought estimation }
|
||||
@ -240,6 +245,12 @@ procedure Ansi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
|
||||
my0 : size_t;
|
||||
err: cint;
|
||||
begin
|
||||
if PtrInt(iconv_ansi2wide)=-1 then
|
||||
begin
|
||||
DefaultAnsi2UnicodeMove(source,dest,len);
|
||||
exit;
|
||||
end;
|
||||
|
||||
mynil:=nil;
|
||||
my0:=0;
|
||||
// extra space
|
||||
|
Loading…
Reference in New Issue
Block a user