|
GNOME v. KDE, December 2005 editionGNOME v. KDE, December 2005 editionPosted Dec 14, 2005 20:19 UTC (Wed) by nix (subscriber, #2304)In reply to: GNOME v. KDE, December 2005 edition by cloose Parent article: GNOME v. KDE, December 2005 edition
std::string does not dictate representation. That's what traits classes are for. Traits classes for UTF-8, UCS-16, and so on would not be very difficult to write.
This has been true for longer than Qt has existed, I believe: certainly it was true for years before the standardization process was complete.
(Log in to post comments)
GNOME v. KDE, December 2005 edition Posted Dec 14, 2005 21:32 UTC (Wed) by cloose (subscriber, #5066) [Link] std::string does not dictate representation. That's what traits classes are for. Traits classes for UTF-8, UCS-16, and so on would not be very difficult to write. No, you also need codecvt<> facets to convert between different representations (UCS-4, UTF-8, etc). And that's were it gets ugly. AFAIK even "the C++ standard loving" gtkmm created there own string class for UTF-8 (see Glib::ustring). So I would say a) it's not as easy as you make sound and b) as a app developer i have better things to do and just use QString. ;)
GNOME v. KDE, December 2005 edition Posted Dec 15, 2005 10:04 UTC (Thu) by nix (subscriber, #2304) [Link] <blockquote>No, you also need codecvt<> facets to convert between different representations (UCS-4, UTF-8, etc). And that's were it gets ugly. </blockquote> Actually it's about ten lines of calling iconv. I've done it. It's not hard.
GNOME v. KDE, December 2005 edition Posted Dec 22, 2005 8:20 UTC (Thu) by oever (subscriber, #987) [Link] Actually it's about ten lines of calling iconv. I've done it. It's not hard. That sounds interesting. I've been looking for a way to handle different encodings nicely with just the STL. Could you give me a pointer to an example?
|
Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.