Re: [fpc-pascal] Unicode filenames

2008-07-01 Thread Marc Weustink
Mattias Gärtner wrote: Zitat von Graeme Geldenhuys <[EMAIL PROTECTED]>: 2008/6/30 Mattias Gaertner <[EMAIL PROTECTED]>: Can you test to create a chinese filename in the explorer. For example: ±±·½»°.txt I can't create that file in Windows Explorer. I'm using Windows 2000 in a VMWare session.

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Michael Van Canneyt
On Mon, 30 Jun 2008, Marco van de Voort wrote: > > Zitat von Marco van de Voort <[EMAIL PROTECTED]>: > > > > types? > > > > > > It will be released in August. > > > > If they are bold enough for this big incompatibility, then maybe we must be > > braver too. > > What, also stop supporting anyt

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Marco van de Voort
> Zitat von Marco van de Voort <[EMAIL PROTECTED]>: > > > types? > > > > It will be released in August. > > If they are bold enough for this big incompatibility, then maybe we must be > braver too. What, also stop supporting anything but Windows? > > Both. (and afaik .NET already is), but they d

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Mattias Gärtner
Zitat von Marco van de Voort <[EMAIL PROTECTED]>: > > Zitat von Marco van de Voort <[EMAIL PROTECTED]>: > > > > > > > > Makes me wonder how CodeGear is going to handle something like this. > > > > Have they released more information on their Unicode support? > > > > > > They actually use unicode s

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Marco van de Voort
> Zitat von Marco van de Voort <[EMAIL PROTECTED]>: > > > > > > Makes me wonder how CodeGear is going to handle something like this. > > > Have they released more information on their Unicode support? > > > > They actually use unicode support, so NT only -W functions. > > Do you know what happen w

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Mattias Gärtner
Zitat von Marco van de Voort <[EMAIL PROTECTED]>: > > 2008/6/30 Mattias G?rtner <[EMAIL PROTECTED]>: > > > > >> No idea if this is enough for all cases (I'm not a unicode guru), but > > >> Vladimir (russian developer) reported that it works for him. > > > > > > Of course it works for him - MS keep

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Mattias Gärtner
Zitat von Graeme Geldenhuys <[EMAIL PROTECTED]>: > 2008/6/30 Mattias Gaertner <[EMAIL PROTECTED]>: > > > > Can you test to create a chinese filename in the explorer. For example: > > > > ±±·½»°.txt > > I can't create that file in Windows Explorer. I'm using Windows 2000 > in a VMWare session. I op

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Mattias Gärtner
Zitat von Graeme Geldenhuys <[EMAIL PROTECTED]>: > 2008/6/30 Mattias Gaertner <[EMAIL PROTECTED]>: > >> Even Linux's terminal didn't display the russian directory correcty. > >> A whole bunch of '?' instead. fpGUI worked fine! ;-) > > > > How did you change to russian locale? > > By setti

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Vincent Snijders
Graeme Geldenhuys schreef: 2008/6/30 Mattias Gaertner <[EMAIL PROTECTED]>: Can you test to create a chinese filename in the explorer. For example: 北方话.txt I can't create that file in Windows Explorer. I'm using Windows 2000 in a VMWare session. I opened explorer. Then copied the filename abov

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Marco van de Voort
> 2008/6/30 Mattias G?rtner <[EMAIL PROTECTED]>: > > >> No idea if this is enough for all cases (I'm not a unicode guru), but > >> Vladimir (russian developer) reported that it works for him. > > > > Of course it works for him - MS keeps things going. As long as a user stays > > in > > his code p

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Graeme Geldenhuys
2008/6/30 Mattias Gärtner <[EMAIL PROTECTED]>: > >> function fpgFromOSEncoding(aString: string): TfpgString; >> begin >> Result := AnsiToUtf8(aString); >> end; > > ok. > I wonder, what windows gives for characters not in the current code page. Umm, no idea really. >> No idea if this is enough

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Mattias Gärtner
Zitat von Graeme Geldenhuys <[EMAIL PROTECTED]>: > 2008/6/30 Vincent Snijders <[EMAIL PROTECTED]>: > > > > But for filenames in fpgFileExists? > > Sorry, yes the previous code was for things like painting text. > > > Here is the code for fpgFileExists > > // platform indepenent > function fpgFileE

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Graeme Geldenhuys
2008/6/30 Vincent Snijders <[EMAIL PROTECTED]>: > > But for filenames in fpgFileExists? Sorry, yes the previous code was for things like painting text. Here is the code for fpgFileExists // platform indepenent function fpgFileExists(const FileName: TfpgString): Boolean; begin Result := FileEx

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Graeme Geldenhuys
2008/6/30 Mattias Gaertner <[EMAIL PROTECTED]>: > > Can you test to create a chinese filename in the explorer. For example: > > 北方话.txt I can't create that file in Windows Explorer. I'm using Windows 2000 in a VMWare session. I opened explorer. Then copied the filename above to the clipboard from

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Vincent Snijders
Graeme Geldenhuys schreef: 2008/6/30 Mattias Gaertner <[EMAIL PROTECTED]>: Even Linux's terminal didn't display the russian directory correcty. A whole bunch of '?' instead. fpGUI worked fine! ;-) How did you change to russian locale? By setting the LANG environment variable. expor

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Graeme Geldenhuys
2008/6/30 Mattias Gaertner <[EMAIL PROTECTED]>: > > Can you test to create a chinese filename in the explorer. For example: > > 北方话.txt > > Then check if the file exists. This should work independent of the > locale. > With Utf8ToAnsi this can not work on 1-byte locales. OK, I'll copy and paste t

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Graeme Geldenhuys
2008/6/30 Mattias Gaertner <[EMAIL PROTECTED]>: >> Even Linux's terminal didn't display the russian directory correcty. >> A whole bunch of '?' instead. fpGUI worked fine! ;-) > > How did you change to russian locale? By setting the LANG environment variable. export LANG=ru.UTF-8 > > L

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Mattias Gaertner
On Mon, 30 Jun 2008 01:03:38 +0200 "Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote: > 2008/6/29 Vincent Snijders <[EMAIL PROTECTED]>: > > > > If you create a file with a russian name on your hard disk, can you > > use fpgFileExists to check for its existence? > > I don't know how to change the Wind

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Graeme Geldenhuys
2008/6/29 Vincent Snijders <[EMAIL PROTECTED]>: > > If you create a file with a russian name on your hard disk, can you use > fpgFileExists to check for its existence? I don't know how to change the Windows language to Russian, but I do under Linux. So I did the following. I changed my Linux syste

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Mattias Gaertner
On Mon, 30 Jun 2008 09:04:21 +0200 "Graeme Geldenhuys" <[EMAIL PROTECTED]> wrote: > 2008/6/30 Vincent Snijders <[EMAIL PROTECTED]>: > > > > Even if it doesn't contain Russian locale, you would be able to > > create such files in the windows explorer to create such file, for > > example by copy / p

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Graeme Geldenhuys
2008/6/30 Vincent Snijders <[EMAIL PROTECTED]>: > > Even if it doesn't contain Russian locale, you would be able to create such > files in the windows explorer to create such file, for example by copy / > pasting the file name while renaming it. > > Then let your fpGui program check for its existen

Re: [fpc-pascal] Unicode filenames

2008-06-30 Thread Graeme Geldenhuys
nglish. Again, no idea how to do this test under Windows without Russian locale support. -- Forwarded message -- From: Graeme Geldenhuys <[EMAIL PROTECTED]> Date: 2008/6/30 Subject: Re: [fpc-pascal] Unicode filenames To: FPC-Pascal users discussions 2008/6/29 Vincent Sni

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Vincent Snijders
Graeme Geldenhuys schreef: 2008/6/29 Vincent Snijders <[EMAIL PROTECTED]>: If you create a file with a russian name on your hard disk, can you use fpgFileExists to check for its existence? My Windows doesn't contain a Russian locale, but I tried it with French, German etc names and it works. I

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Tomas Hajny
On 29 Jun 08, at 20:48, Felipe Monteiro de Carvalho wrote: > On Sun, Jun 29, 2008 at 8:06 PM, Graeme Geldenhuys > <[EMAIL PROTECTED]> wrote: > > I did a test and sent a screenshot of the results. I don't know what's > > the limit of attachments in this mailing list. So let me know if the > > attac

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Felipe Monteiro de Carvalho
On Sun, Jun 29, 2008 at 8:06 PM, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: > I did a test and sent a screenshot of the results. I don't know what's > the limit of attachments in this mailing list. So let me know if the > attachment didn't go through. The file was 22kb in size. Nothing arived h

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Graeme Geldenhuys
2008/6/29 Vincent Snijders <[EMAIL PROTECTED]>: > > If you create a file with a russian name on your hard disk, can you use > fpgFileExists to check for its existence? I did a test and sent a screenshot of the results. I don't know what's the limit of attachments in this mailing list. So let me k

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Graeme Geldenhuys
2008/6/29 Vincent Snijders <[EMAIL PROTECTED]>: > > If you create a file with a russian name on your hard disk, can you use > fpgFileExists to check for its existence? My Windows doesn't contain a Russian locale, but I tried it with French, German etc names and it works. I asked Vladimir to create

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Vincent Snijders
Graeme Geldenhuys schreef: 2008/6/29 Vincent Snijders <[EMAIL PROTECTED]>: I see you are crippled in the same way as the LCL, because you only can handle ansi filenames correctly. fpGUI was tested under Windows with Russian locale and filenames. Not tested by me, but my a co-developer (Vladimi

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Vincent Snijders
Graeme Geldenhuys schreef: 2008/6/29 Vincent Snijders <[EMAIL PROTECTED]>: I see you are crippled in the same way as the LCL, because you only can handle ansi filenames correctly. fpGUI was tested under Windows with Russian locale and filenames. Not tested by me, but my a co-developer (Vladimi

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Felipe Monteiro de Carvalho
> procedure AnyFileRoutineInWin32(AFileName: widestring); > begin > if UnicodeEnabledOS then SomeWin32APIW() > else AnsiToWideString(SomeWin32ApiA()) > end; If you want even more details you can initialize UnicodeEnabledOS by reading the operating system version and the operating system type NT/

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Felipe Monteiro de Carvalho
On Sun, Jun 29, 2008 at 3:19 PM, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: > fpGUI was tested under Windows with Russian locale and filenames. Not > tested by me, but my a co-developer (Vladimir). He reported that the > file dialogs and other file related functions worked correctly. He > actuall

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Felipe Monteiro de Carvalho
On Sun, Jun 29, 2008 at 6:32 AM, Marco van de Voort <[EMAIL PROTECTED]> wrote: > - If the border condition that w9x must remain supported persists, this > becomes a magnitude more work. A way to deal with this has to be found > (two win32 FPC releeases, one advocated as D2..D2006 compat + w9x, on

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Graeme Geldenhuys
2008/6/29 Vincent Snijders <[EMAIL PROTECTED]>: > > I see you are crippled in the same way as the LCL, because you only can > handle ansi filenames correctly. fpGUI was tested under Windows with Russian locale and filenames. Not tested by me, but my a co-developer (Vladimir). He reported that the

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Martin Schreiber
On Sunday 29 June 2008 13.10:33 Marco van de Voort wrote: > > - Which encoding(s) to support (utf-8 and/or utf-16 mostly) In order to complement Graemes mail, MSEgui uses widestrings for everything. Martin ___ fpc-pascal maillist - fpc-pascal@lists.f

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Vincent Snijders
Graeme Geldenhuys schreef: 2008/6/29 Vincent Snijders <[EMAIL PROTECTED]>: How does the RTL support using unicode filenames (e.g. file names that cannot be represented by the ansi char set)? For example the FileExists function takes a string which is encoded in the system char set. If the syste

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Graeme Geldenhuys
2008/6/29 Vincent Snijders <[EMAIL PROTECTED]>: > How does the RTL support using unicode filenames (e.g. file names that > cannot be represented by the ansi char set)? > > For example the FileExists function takes a string which is encoded in the > system char set. If the system char set is UTF8, l

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Marco van de Voort
> Marco van de Voort schreef: > > What are the exact plans of Lazarus in this? Is there some wiki page with > > how Lazarus plans to tackle this with all multi-platform concerns? > > All strings the LCL are UTF8, see > http://wiki.lazarus.freepascal.org/LCL_Unicode_Support > > For windows this

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Vincent Snijders
Marco van de Voort schreef: What are the exact plans of Lazarus in this? Is there some wiki page with how Lazarus plans to tackle this with all multi-platform concerns? All strings the LCL are UTF8, see http://wiki.lazarus.freepascal.org/LCL_Unicode_Support For windows this means all strin

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Marco van de Voort
> How does the RTL support using unicode filenames (e.g. file names that > cannot be represented by the ansi char set)? As said on IRC, afaik decisions about this have been continuously postponed. There are some problems: - If the border condition that w9x must remain supported persists, this

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Jonas Maebe
On 29 Jun 2008, at 09:43, Jonas Maebe wrote: On 29 Jun 2008, at 09:27, Vincent Snijders wrote: How does the RTL support using unicode filenames (e.g. file names that cannot be represented by the ansi char set)? It doesn't. See also http://bugs.freepascal.org/view.php?id=7863 Jonas

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Martin Schreiber
On Sunday 29 June 2008 09.27:24 Vincent Snijders wrote: > How does the RTL support using unicode filenames (e.g. file names that > cannot be represented by the ansi char set)? > > For example the FileExists function takes a string which is encoded in > the system char set. If the system char set is

Re: [fpc-pascal] Unicode filenames

2008-06-29 Thread Jonas Maebe
On 29 Jun 2008, at 09:27, Vincent Snijders wrote: How does the RTL support using unicode filenames (e.g. file names that cannot be represented by the ansi char set)? It doesn't. Jonas ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org ht

[fpc-pascal] Unicode filenames

2008-06-29 Thread Vincent Snijders
How does the RTL support using unicode filenames (e.g. file names that cannot be represented by the ansi char set)? For example the FileExists function takes a string which is encoded in the system char set. If the system char set is UTF8, like most linuxes and Mac OS X, then there is no probl