mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-10 12:18:23 +02:00
* fixed the conversion of 'UTF-8' to the corresponding code page number
(there's a dummy entry with code page 0 for UTF-8 in the table for when 0 is searched, but when going from string to number that entry has to be skipped so the real UTF-8 entry is used) git-svn-id: trunk@22245 -
This commit is contained in:
parent
17c495595c
commit
d4eb2d7336
@ -655,8 +655,10 @@ begin
|
|||||||
SetCodePage(cpname,$ffff,false);
|
SetCodePage(cpname,$ffff,false);
|
||||||
|
|
||||||
{ simple linear scan, not a common operation and hence not worth
|
{ simple linear scan, not a common operation and hence not worth
|
||||||
building a separate array for }
|
building a separate array for -- start from index 1 rather than
|
||||||
for i:=low(win2iconv_arr) to high(win2iconv_arr) do
|
0, because 0 = fake "code page 0" that maps to UTF-8 as default
|
||||||
|
}
|
||||||
|
for i:=low(win2iconv_arr)+1 to high(win2iconv_arr) do
|
||||||
if win2iconv_arr[i].name=cpname then
|
if win2iconv_arr[i].name=cpname then
|
||||||
begin
|
begin
|
||||||
result:=win2iconv_arr[i].cp;
|
result:=win2iconv_arr[i].cp;
|
||||||
|
Loading…
Reference in New Issue
Block a user