Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old November 20th, 2003, 06:26 AM
Registered User
 
Join Date: Sep 2003
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Properly supporting Unicode in C++

I have a few questions for anyone who is experienced writing C++ applications that support Unicode.

First, I generally try to derive my exception classes from std::exception, which has a virtual function what() that returns a char const*. Do you typically have to abandon this exception base class in order to have exceptions that carry Unicode strings?

Second, the standard library (both C and C++) provides support for manipulating wide character strings, but neither seems to provide support for filenames specified using wide characters. If you had a file that had a Chinese name, is it possible to open this file using standard I/O routines?

Lastly, how do people typically represent Unicode strings in the C++ data type wchar_t? Does the two-byte size of the character type mean that UCS-2 (UTF-16) encoding is always used, or is it largely up to the programmer how to handle this? Do you ever need to come up with a scheme for using and specifying a character encoding with text files that are meant to be exchanged with other programs?

Are there any good books recommended for learning to support Unicode in a C++ application? I have a general familiarity with the concepts behind Unicode and character encodings. What I'm really looking for is something that explains how to apply it to C++'s wide-character and internationalization support.

Thanks in advance for any advice.

Regards,
Jake.





Similar Threads
Thread Thread Starter Forum Replies Last Post
A DataList supporting paging Magi BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 4 August 14th, 2007 10:21 PM
Javascript - Firefox is not supporting lakshmi252002 General .NET 0 April 17th, 2007 12:14 AM
Why C# is not supporting Multiple Inheritance? ramk_1978 C# 5 April 26th, 2006 08:05 AM
FREE ASP SUPPORTING SERVERS glisando Dreamweaver (all versions) 2 June 8th, 2005 11:54 AM
Supporting Englere to write the next Edition groupmatch BOOK: ASP.NET Website Programming Problem-Design-Solution 5 August 31st, 2004 04:33 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.