delorie.com/archives/browse.cgi | search |
From: | "Alex Vinokur" <alexvn AT bigfoot DOT com> |
Newsgroups: | alt.comp.lang.learn.c-c++,comp.lang.c++,comp.os.msdos.djgpp |
Subject: | Re: char[] & non-Latin letters |
Date: | Tue, 27 Aug 2002 22:50:48 +0200 |
Lines: | 71 |
Message-ID: | <akgl7a$1i2cm0$1@ID-79865.news.dfncis.de> |
References: | <akdr5h$1hk2er$1 AT ID-79865 DOT news DOT dfncis DOT de> <3D6B432F DOT 4552DB3E AT mail1 DOT stofanet DOT dk> |
NNTP-Posting-Host: | 212.150.34.12 |
X-Trace: | fu-berlin.de 1030477868 52507328 212.150.34.12 (16 [79865]) |
X-Priority: | 3 |
X-MSMail-Priority: | Normal |
X-Newsreader: | Microsoft Outlook Express 5.50.4522.1200 |
X-Mimeole: | Produced By Microsoft MimeOLE V5.50.4522.1200 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Reply-To: | djgpp AT delorie DOT com |
"Bjorn Reese" <breese AT mail1 DOT stofanet DOT dk> wrote in message news:3D6B432F DOT 4552DB3E AT mail1 DOT stofanet DOT dk... > Alex Vinokur wrote: > > > > Is it possible/will possible/worth being possible to use non-Latin letters (Hebrew, Chinese etc) in char[] ? > > It depends on what kind of encoding you are using. If you are using > a multibyte character encoding then yes. If you are using a wide > character encoding then wchar_t is a better option. > > There are dedicated 8-bit encodings of Chinese (e.g. EUC-CN), Hebrew > can be encoded directly in 8-bit characters (ISO 8859-8). > > Furthermore, there are 8-bit encodings of the more generic Unicode > (UTF-8). > > The choice is yours. Thanks. I have the following problem with wchar_t. =============== Windows 2000 DJGPP 2.03 gcc/gpp version 3.1 =============== ========= C++ code : BEGIN ========= // File ttt.cpp #include <wchar.h> #include <iostream> using namespace std; int main () { #define TEST_VALUE 65 char c_value = TEST_VALUE; wchar_t wc_value = TEST_VALUE; cout << c_value << endl; cout << wc_value << endl; return 0; } ========= C++ code : END =========== ========= Compilation & Run : BEGIN ========= %gpp ttt.cpp A 65 // ??? ========= Compilation & Run : END =========== How can we print wchar_t value ? ================== Alex Vinokur mailto:alexvn AT go DOT to http://up.to/alexvn ==================
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |