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++ Core » [SOLVED] String.GetCount with umlaut
Re: String.GetCount with umlaut [message #33709 is a reply to message #33707] Wed, 07 September 2011 08:20 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1189
Registered: March 2006
Location: Italy
Senior Contributor
forlano wrote on Tue, 06 September 2011 23:12

Hello,

GetCount() returns 7 for the string "lubäck" Surprised

I see only 6 characters. Where is the trick?
I guess 'ä' is counted twice, but how can I know how many characters are really there in a string?

I am having problem with string aligning of text file in case of accented characters. If even GetCount give uncorrect answer I will not be able to correct the row lenght to be displayed adding additional space (it seems that for each accented characters a space is eated). By the way this was an old issue that I was never able to resolve in my application.



Here is what I mean with aligning characters

index.php?t=getfile&id=3434&private=0

I tried to accomodate the names with %-32.32 but the accented characters are counted twice (!) so the visual effect was that of eaten space or shift to left.

Perhaps I must convert the name to some other encoding before to save them Rolling Eyes let's go to try ... Anyway the number of chars I think should be calculated correctly under every encoding.

Luigi

[Updated on: Wed, 07 September 2011 08:36]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Array : swapping element with a pointer
Next Topic: Core: Null handling incoherent?
Goto Forum:
  


Current Time: Wed Jun 05 21:44:33 CEST 2024

Total time taken to generate the page: 0.01363 seconds