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 » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » FileSelector charset problem - patch
FileSelector charset problem - patch [message #632] Mon, 23 January 2006 01:10 Go to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
The problem is that windows dialogs are using their own system encoding and it looks ugly to pass them utf-8 strings.
The attached patch can resolve this problem (I hope so).
An other comment: filedir variable was not really used, so I removed it.
Re: FileSelector charset problem - patch [message #660 is a reply to message #632] Tue, 24 January 2006 01:18 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
Hello, I can see, that you have applied theese to the new snapshot, but it has a problem yet.
In the original patch I used a temporary String object (title) to store the buffer of ofn.lpstrTitle. This is because lpstrTitle is a pointer only, not a String object. Setting him to something on stack is a bug.
So it works now buggy, showing some rubbish text from the stack on the FileSelector dialog title.
Could you change it to the original way?
Re: FileSelector charset problem - patch [message #661 is a reply to message #660] Tue, 24 January 2006 01:23 Go to previous messageGo to next message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
I mean this way would be correct:
	String title;
	if(dlgtitle)
		title = ToSystemCharset(dlgtitle);
	else if(open)
		title = ToSystemCharset(t_("Open.."));
	else
		title = ToSystemCharset(t_("Save as"));
	ofn.lpstrTitle = ~title;
Re: FileSelector charset problem - patch [message #665 is a reply to message #661] Tue, 24 January 2006 10:52 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Ooops, sorry. I must have beed sleepy....

Well, maybe it would be better to post patches as complete files. I have still a problem finding a tool for them that I would like. With complete file I would just used GUI tool to compare patch with original file and then copy patch over....

MIrek
Re: FileSelector charset problem - patch [message #667 is a reply to message #665] Tue, 24 January 2006 11:09 Go to previous message
zsolt is currently offline  zsolt
Messages: 697
Registered: December 2005
Location: Budapest, Hungary
Contributor
OK, than I will post complete files as my patches.
Previous Topic: scrollbar missing for LineEdit [FIXED]
Next Topic: editors problems: tabs, capitalization... [FIXED]
Goto Forum:
  


Current Time: Thu May 02 21:54:17 CEST 2024

Total time taken to generate the page: 0.05892 seconds