[fpc-pascal] Please Help with inifile in WinCE (ReadSectionValues into stringlist)

2009-09-12 Thread epergola

Hi
I have a small translation file (pure ASCII DOS text) written in Win32. I
copied it to the emulator with Activesync.
The file contains one sections ('f') in this format
[f]
'Language||idioma'.  (etc.)
(i.e. the English test on the 1st half, the Spanish translation on the 2nd
half)
In the WinCE test program run on the emulator, I read it this way:

 IniFile := TIniFile.Create(s) ;
  tl:=TStringList.Create;
  try
inifile.ReadSectionValues('f',tL);
for i:=0 to tl.Count-1 do begin
   tl[i]:=ConvertEncoding(tl[i],GuessEncoding(tl[i]),EncodingAnsi);
   memo1.lines.add(tl[i]);  
Now all works fine when the (2nd half) Spanish part has only english
characters.
But when there are spanish special characters  (accented A or O and similar)
the tl[]
line is not written to memo1 at all.
I assume the inifile in Wince is widestring UTF* encoded, so i tried to
convert it
to ansi encoding but AFTER the tl string list is already populated. Is this
the problem?
If so, what should I ReadSectionValues into different form TStringList?
If the problem is other, can anyone give me clue? 
Thanks very much for any help

-- 
View this message in context: 
http://www.nabble.com/Please-Help-with-inifile-in-WinCE-%28ReadSectionValues-into-stringlist%29-tp25411974p25411974.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Please Help with inifile in WinCE (ReadSectionValues into stringlist)

2009-09-12 Thread JoshyFun
Hello FPC-Pascal,

Saturday, September 12, 2009, 8:30:02 AM, you wrote:

e tl[i]:=ConvertEncoding(tl[i],GuessEncoding(tl[i]),EncodingAnsi);
ememo1.lines.add(tl[i]);  
e Now all works fine when the (2nd half) Spanish part has only english
e characters.
e But when there are spanish special characters  (accented A or O and similar)
e the tl[]
e line is not written to memo1 at all.

I think this is a Lazarus subject but:

tl[i]:=ConvertEncoding(tl[i],'iso88591','utf8');

Because the ini file has spanish text so the source encoding should be
iso-8859-1 and target encoding should be UTF8 to be displayed in a
memo box.

-- 
Best regards,
 JoshyFun

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Weak linking on Mac OS?

2009-09-12 Thread Tobias Giesen
Hello,

I wasn't able to find information on this on the web - apparently it has
been implemented for Mac OS X but how can I use it? Is there a special
keyword for it?

Thanks.

Cheers,
Tobias


___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Weak linking on Mac OS?

2009-09-12 Thread Jonas Maebe


On 12 Sep 2009, at 20:22, Tobias Giesen wrote:

I wasn't able to find information on this on the web - apparently it  
has

been implemented for Mac OS X but how can I use it? Is there a special
keyword for it?


weakexternal (instead of external). It's only available in 2.3.1 and  
later though.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal