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++ Widgets - General questions or Mixed problems » How to convert utf-8 to (strcmp type)?
Re: How to convert utf-8 to (strcmp type)? [message #30963 is a reply to message #30909] Sun, 30 January 2011 12:49 Go to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
cbpporter wrote on Fri, 28 January 2011 04:22

Do you want to convert it to a legacy encoding? strcmp will work for equality test with utf-8, but not with comparison.


Actually, it will work for comparison as well, only the results might not be what you have expected...

Anyway, the same is true for 'legacy encoding'. The correct comparison depends on language rules; you ought to use LanguageInfo::Compare to get correct results, but it is now implemented only for Czech language and even that is not a full implementation of rules...

(That said, there is some default implementation in int DefaultLanguageCompare that would probably work reasonably well for most Latin based languages).


Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to maximize printing area of the RichEdit Ctrl? [SOLVED]
Next Topic: Main frame dlg: How to store last dimension and position?
Goto Forum:
  


Current Time: Mon Aug 04 00:16:12 CEST 2025

Total time taken to generate the page: 0.07156 seconds