|
|
Home » U++ Library support » FileSel&FileList, Path » Codepage problem in FileSel directory selection droplist
Codepage problem in FileSel directory selection droplist [message #23251] |
Mon, 05 October 2009 12:28  |
Tom1
Messages: 1301 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi,
I encountered a strange problem with the directory selection droplist of the FileSel dialog: The first entry is the home directory and is filled with dir.Add(GetHomeDirectory());. In the directory name a character 'á' gets replaced by another character (German double S) when the application executable is started stand-alone, but when started with Ctrl+F5 from TheIDE, there is no problem.
To figure out what's going on, I changed the GetHomeDirectory functionality in App.cpp by changing GetEnv() as follows:
String GetEnv(const char *id)
{
// return FromOEMCharset(getenv(id));
return FromSystemCharset(getenv(id));
}
What happened was, the character 'á' disappeared altogether when running the application from TheIDE, but was now correctly presented when the application was started as standalone.
Any idea what's going on here?
// Tom
[UPDATE: This is under Windows Vista x64 and the problem when running the application standalone was detected with 32 bit Windows XP, so they seem to have the same behavior.]
[Updated on: Mon, 05 October 2009 12:32] Report message to a moderator
|
|
|
Re: Codepage problem in FileSel directory selection droplist [message #23253 is a reply to message #23251] |
Mon, 05 October 2009 13:51   |
 |
mirek
Messages: 14255 Registered: November 2005
|
Ultimate Member |
|
|
Tom1 wrote on Mon, 05 October 2009 06:28 | Hi,
I encountered a strange problem with the directory selection droplist of the FileSel dialog: The first entry is the home directory and is filled with dir.Add(GetHomeDirectory());. In the directory name a character 'á' gets replaced by another character (German double S) when the application executable is started stand-alone, but when started with Ctrl+F5 from TheIDE, there is no problem.
To figure out what's going on, I changed the GetHomeDirectory functionality in App.cpp by changing GetEnv() as follows:
String GetEnv(const char *id)
{
// return FromOEMCharset(getenv(id));
return FromSystemCharset(getenv(id));
}
What happened was, the character 'á' disappeared altogether when running the application from TheIDE, but was now correctly presented when the application was started as standalone.
Any idea what's going on here?
// Tom
[UPDATE: This is under Windows Vista x64 and the problem when running the application standalone was detected with 32 bit Windows XP, so they seem to have the same behavior.]
|
Nice one.
I believe I know what is going on.
The issue is that TheIDE changes the environment to add one special variable. Maybe this can affect the issue.
Anyway, staring into the code, I do not see anything indicating that codepage is changed on the way - in fact no conversions seem to be performed at all.
Relevant code is:
Core\App.cpp
void AppInitEnvironment__()
ide\Builders\Build.cpp
One<Host> MakeBuild::CreateHost(bool sync_files)
Perhaps adding a couple of well placed LOGs would reveal the problem.
Mirek
|
|
|
Re: Codepage problem in FileSel directory selection droplist [message #23264 is a reply to message #23253] |
Tue, 06 October 2009 11:06   |
Tom1
Messages: 1301 Registered: March 2007
|
Ultimate Contributor |
|
|
Hi Mirek,
Well, I kind of knew you would know what is going on... Anyway, I took a look at the source locations you pointed out but I did not get any smarter on the way. I guess this needs deeper understanding on the subject than what I have.
I gather that this problem has wider effects than just the file dialog. The whole GetEnv and everything using it (including GetHomeDirectory) are broken until this gets solved.
// Tom
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 19:03:21 CEST 2025
Total time taken to generate the page: 0.00918 seconds
|
|
|