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 » U++ Library : Other (not classified elsewhere) » Bug: problem with special characters on Button
Bug: problem with special characters on Button [message #42225] Fri, 28 February 2014 15:01 Go to next message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
When setting a label on a Button where the last position is a special character, the button shows 3 squares instead of the character. My workaround for now is to add a space at the end.
(Using utf-8 encoding)

Example:

Button b;
b.SetLabel("Pita Hamö");  // ö becomes 3 squares
b.SetLabel("Pita Hamö ");  // shows correctly


[Updated on: Fri, 28 February 2014 15:03]

Report message to a moderator

Re: Bug: problem with special characters on Button [message #42238 is a reply to message #42225] Sat, 01 March 2014 11:07 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
It works fine for me...

However, I have noticed something similar in the past, it was caused by switching the file encoding from UTF8 to UTF8-BOM (check in TheIDE window title).

Mirek
Re: Bug: problem with special characters on Button [message #42242 is a reply to message #42225] Sat, 01 March 2014 12:53 Go to previous messageGo to next message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
It says UTF-8 in the title.

Was utf-8 bom the cause or the solution?

(TheIde 6813, windows)
Re: Bug: problem with special characters on Button [message #42243 is a reply to message #42242] Sat, 01 March 2014 13:04 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
The cause.

OK, would it be possible to create and upload a testcase? (As .zip file). Very likely the code I have created for testing is different....

Mirek
Re: Bug: problem with special characters on Button [message #42244 is a reply to message #42225] Sat, 01 March 2014 15:28 Go to previous message
Alboni is currently offline  Alboni
Messages: 214
Registered: January 2012
Location: Deventer, Netherlands
Experienced Member
I was unable to create a testcase that would show the problem.
It turned out to be a bug in my program wich I fixed.

Cause: The use of GetCharCount instead of GetCount when scanning a string for a suitable spot to break it into multiple lines.
I was under the impression that somestring[i] would produce a variable width character rather than a byte.

thanks

Previous Topic: SERIOUS: Fatal error: invalid memory access
Next Topic: [DEPRECTED] GLDrawDemo - Resizing dosen't work.
Goto Forum:
  


Current Time: Thu Mar 28 21:16:17 CET 2024

Total time taken to generate the page: 0.00845 seconds