Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » FileSel&FileList, Path » Codepage problem in FileSel directory selection droplist
Re: Codepage problem in FileSel directory selection droplist [message #23253 is a reply to message #23251] Mon, 05 October 2009 13:51 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: A little improvement to AppendFileName
Next Topic: FileSel::ExecuteSaveAs() crashes
Goto Forum:
  


Current Time: Fri May 03 13:53:19 CEST 2024

Total time taken to generate the page: 0.03384 seconds