Thread View: borland.public.cppbuilder.internationalization
2 messages
2 total messages
Started by LesleyAnne
Wed, 07 Sep 2005 21:49
How do I open a file?
Author: LesleyAnne
Date: Wed, 07 Sep 2005 21:49
Date: Wed, 07 Sep 2005 21:49
9 lines
1479 bytes
1479 bytes
This may be a stupid question. I'm not even trying to do what I think of as
an international application, since the file I'm working with is just simple
ASCII text. My problem is that I want to be able to open it regardless of
what folder it's in. The simple straightforward way of opening a file:
if (OpenDialog1->Execute())
iFileHandle = FileOpen(OpenDialog1->FileName, fmOpenRead);
fails any time any folder in the file's path includes Japanese characters.
So how am I supposed to do that if the file's path and name can have any
characters that Windows allows to be in a pathname?
Re: How do I open a file?
Author: Muzaffar Mahkamov
Date: Tue, 20 Sep 2005 09:48
Date: Tue, 20 Sep 2005 09:48
14 lines
1674 bytes
1674 bytes
LesleyAnne wrote: > This may be a stupid question. I'm not even trying to do what I think of as > an international application, since the file I'm working with is just simple > ASCII text. My problem is that I want to be able to open it regardless of > what folder it's in. The simple straightforward way of opening a file: > if (OpenDialog1->Execute()) > iFileHandle = FileOpen(OpenDialog1->FileName, fmOpenRead); > fails any time any folder in the file's path includes Japanese characters. > So how am I supposed to do that if the file's path and name can have any > characters that Windows allows to be in a pathname? > > Use WideFileOpen() from TNT Unicode components or CreateFileW() WinAPI function.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads