473,799 Members | 3,810 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Wide Characters



Is the numerical value for a wide character the same as it is for a
normal character, by which I mean:

'a' == static_cast< char > ( L'a' );

'7' == static_cast< char > ( L'7' );

'k' == static_cast< char > ( L'k' );

'w' == static_cast< char > ( L'w' );

't' == static_cast< char > ( L't' );
I know that it is on MS Windows, but what about Standard C++?

-Tomás
Mar 1 '06 #1
1 1705

Tomás wrote:
Is the numerical value for a wide character the same as it is for a
normal character, by which I mean:

'a' == static_cast< char > ( L'a' );

'7' == static_cast< char > ( L'7' );

'k' == static_cast< char > ( L'k' );

'w' == static_cast< char > ( L'w' );

't' == static_cast< char > ( L't' );
I know that it is on MS Windows, but what about Standard C++?
I doubt that this has been specified. One could imagine e.g. a system
using EBCDIC for char and some unicode-format for wchar_t.

/Peter
-Tomás


Mar 1 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2651
by: Jonathan Mcdougall | last post by:
I started using boost's filesystem library a couple of days ago. In its FAQ, it states "Wide-character names would provide an illusion of portability where portability does not in fact exist. Behavior would be completely different on operating systems (Windows, for example) that support wide-character names, than on systems which don't (POSIX). Providing functionality that appears to provide portability but in fact
15
2669
by: Steve | last post by:
Hi, I've been charged with investigating the possibilities of internationalizing our C++ libraries. std::strings are used all over the place, and unfortunately a mixture of isalpha,isdigit,etc. functions from the C library and C++ locale stuff. To fully embrace i18n I'm wondering if we have to fully make the switch to everything being wide ( wstring, wcin, wcout, wide streams, etc.)
3
6858
by: yazan jab | last post by:
Is it true that Multibyte characters are : char arrays (witch represent a string from the basic characters set). In this case Wide characters are the way for encoding characters from the extended characters set. or Multibyte characters are: characters from the extended character set which need more than one byte to encode. And in this case wide
11
5223
by: Roger Leigh | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The program listed below demonstrates the use of wcsftime() and std::time_put<wchar_t> which is a C++ wrapper around it. (I know this isn't C; but the "problem" lies in the C library implementation of wcsftime()). I'm not sure if this is a platform-dependent feature or part of the C standard. I've compiled with GCC 3.4.3 on GNU/Linux, and run in an en_GB UTF-8
1
2476
by: Anitha Adusumilli | last post by:
Hi Can someone pls explain the usage of wide characters and tchar? Also, what should I be careful about, while coding in C, to make my code portable and suitable for internationalization? ( I am looking for some tips from experienced programmers) Thanks Anitha
1
2327
by: jjf | last post by:
Do Standard C's wide characters and wide strings require absolutely that each character be stored in a single wchar_t, or can characters be "multi-wchar_t" in the same way that they can be multibyte? Is it a requirement that the number of wchar_t's in a string is the same as the number of characters in the string (give or take the terminal null character)? The particular case I'm puzzling over is whether or not it is conforming for an...
8
11888
by: Brand Bogard | last post by:
Does the C standard include a library function to convert an 8 bit character string to a 16 bit character string?
2
2901
by: Elie Roux | last post by:
Hello, I would like to write a wide chars string with printf, but I do not really understand the behaviour I have with this basic test program for example : #include <stdlib.h> #include <stdio.h> #include <wchar.h> int main () {
4
17788
by: thinktwice | last post by:
i'm using VC++6 IDE i know i could use macros like A2T, T2A, but is there any way more decent way to do this?
17
10710
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, Wide character and multi-byte character are two popular encoding schemes on Windows. And wide character is using unicode encoding scheme. But each time I feel confused when talking with another team -- codepage -- at the same time. I am more confused when I saw sometimes we need codepage parameter for wide character conversion, and sometimes we do not need for conversion. Here are two examples,
0
10488
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10257
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10237
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10029
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6808
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4144
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.