🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #5982

Re: utf8 in C++

#5982
From: Nicolas Barbier
Date: Fri, 14 Feb 2003 17:54
31 lines
2115 bytes
Dominique Devriese wrote:

>>> je verondersteld wordt te escapen ?  vb. een string met de
>>> griekse letter theta in ( theta is 03B8 in utf8, schijnt het )..

Ik veronderstel dat je 03B8 in Unicode bedoelt.

> bedankt voor de reactie, maar ik denk niet dat het dat is..  utf8
> wordt gewoon opgeslagen als gewone char's, ik zou alleen moeten vinden
> hoe je niet-ascii-karakters kan escapen in zo'n stringconstante..

Google -> "utf8" -> 
http://www.sun.com/developers/gadc/technicalpublications/articles/utf8.html

Character Range  Bit Encoding
U+0000 - U+007F  0xxxxxxx
U+0080 - U+07FF  110xxxxx 10xxxxxx
U+0800 - U+FFFF  1110xxxx 10xxxxxx 10xxxxxx
U+10000 - U+10FFFF  11110xxx 10xxxxxx 10xxxxxx 10xxxxxx

03B8 = 1110111000

Maw 03B8 (Unicode kleine letter theta) wordt geencodeerd als: 110[01110] 
10[111000] = CEB8

Maw "\xCE\xB8"

Correct me if I'm wrong.

-- 
Nicolas Barbier
Technical Details
Message-ID: <3e4d2d74$0$390$afc38c87@sisyphus.news.be.easynet.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!195.40.4.120.MISMATCH!easynet-quince!easynet.net!feed1.news.be.easynet.net!sisyphus.news.be.easynet.net!not-for-mail
References: <87el6jsic7.fsf@appel.kotnet.org> <kDx1a.40901$Jd.5247@afrodite.telenet-ops.be> <8765rts21p.fsf@appel.kotnet.org>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,ad2572c84938ce1
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2003-02-14 09:56:03 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!195.40.4.120.MISMATCH!easynet-quince!easynet.net!feed1.news.be.easynet.net!sisyphus.news.be.easynet.net!not-for-mail
Message-ID: <3e4d2d74$0$390$afc38c87@sisyphus.news.be.easynet.net>
From: Nicolas Barbier <anti@spam.invalid>
Subject: Re: utf8 in C++
Newsgroups: be.comp.programming
Date: Fri, 14 Feb 2003 18:54:21 +0100
References: <87el6jsic7.fsf@appel.kotnet.org> <kDx1a.40901$Jd.5247@afrodite.telenet-ops.be> <8765rts21p.fsf@appel.kotnet.org>
User-Agent: KNode/0.6.1
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Lines: 31
Organization: [ posted via Easynet Belgium ]
NNTP-Posting-Date: 14 Feb 2003 17:55:00 GMT
NNTP-Posting-Host: 213.193.183.53
X-Trace: 1045245300  390 [::ffff:213.193.183.53]:32801
X-Complaints-To: abuse@be.easynet.net