Re: [fpc-pascal] Set of encoding conversion routines

2009-08-11 Thread theo
I just needed UTF-8 to Latin 1 ISO but I can't find a cross-platform solution. Remembering that UTF8ToAnsi doesn't solve the problem because it converts to the system encoding and not Latin 1 ISO. A simpe option might be: wides:=UTF8Decode(utf8s);

[fpc-pascal] Dynamic loading shared libraries

2009-08-11 Thread theo
Am I right, that with fpc it is only possible to write bindings for dynamically loading shared libraries (using LoadLibrary) the hard way? Meaning declare function like: init_alloc_root : procedure(root: PMEM_ROOT;block_size : Cardinal);extdecl; and then using GetProcedureAddress like:

Re: [fpc-pascal] Dynamic loading shared libraries

2009-08-11 Thread theo
How would the easy way be? I've just been looking into some old Kylix sources: interface const LibName = ''; function XftDrawCreate(display: PDisplay; win: XID; vis: PVisual; colorm: longint): PXftDraw; cdecl; implementation function XftDrawCreate(display: PDisplay; win: XID; vis:

Re: [fpc-pascal] Dynamic loading shared libraries

2009-08-11 Thread theo
for imports I was looking for something like dynamic Regards Theo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] DBus interface needs an update

2009-08-10 Thread theo
Florian Klaempfl schrieb: Please create and attach it to an issue report so we don't forget it. You mean using the bugtracker? If you like, you could also add the files to packages/dbus What do you prefer? Regards Theo ___ fpc-pascal maillist

Re: [fpc-pascal] DBus interface needs an update

2009-08-10 Thread theo
with the provided example lshalpas.pp. lshalpas should produce the same results as lshal http://linux.die.net/man/1/lshal So imho testing lshalpas is enough review ;-) Best regards Theo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] DBus interface needs an update

2009-08-09 Thread theo
If somebody is still interested in HAL (I know that DeviceKit ist coming): I've made a header translation and a demo (translation of lshal.c) yesterday. It seems to work for me. http://www.theo.ch/lazarus/dbus/hal.tar.gz ___ fpc-pascal maillist -

Re: [fpc-pascal] More WideString routines

2009-08-03 Thread theo
Felipe Monteiro de Carvalho schrieb: Hello, At the moment I need a widestring replacement for StrPos. I searched for WideStrPos in my FPC 2.2.2 but nothing came. Any ideas? StrPos is for PChar. Do you mean Pos? There are lots of versions of Pos. One of them is Function Pos (Const Substr :

Re[2]: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-26 Thread theo
is certainly true, but I don't understand what it has to do with UTF-8 or UTF-16. The code is not optimized but if somebody wants to use them please ask Yes please! Regards Theo ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-26 Thread theo
They should, since the uppercase version of i is İ there (i.e., a capital I with a dot on top). See e.g. http://www.i18nguy.com/unicode/turkish-i18n.html Oh, Goodness. ;-) Thanks for the information. Regards Theo ___ fpc-pascal maillist

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-26 Thread theo
I had uploaded the sources to zshare server with the link: Thanks, I'll have a look at it. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Case insensitive comparison of strings with non-ascii characters

2009-07-25 Thread theo
char differs WideCompareText: 268ms unicodeinfo: 3ms WideUpperCase: 8ms Comparing identical Text of 322 Chars 1 times where one Text is all uppercase WideCompareText: 810ms unicodeinfo: 121ms WideUpperCase: 1076ms Regards Theo ___ fpc-pascal