🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: be.comp.programming
6 messages
6 total messages Started by Dominique Devriese Sat, 08 Feb 2003 00:54
utf8 in C++
#5951
Author: Dominique Devriese
Date: Sat, 08 Feb 2003 00:54
15 lines
1622 bytes
hallo,
ik zou een utf8 karakter uit het tweede deel van het spectrum ( de
karakters van twee bytes lang, dus.. ) moeten in een C-string kunnen
zetten, maar ik vind het maar niet.  Iemand die weet hoe je
verondersteld wordt te escapen ?
vb. een string met de griekse letter theta in ( theta is 03B8 in utf8,
schijnt het )..
sjuus
domi

-- 
Q:	Why is it that the more accuracy you demand from an interpolation
	function, the more expensive it becomes to compute?
A:	That's the Law of Spline Demand.
Re: utf8 in C++
#5961
Author: Sven Vermeulen
Date: Sun, 09 Feb 2003 19:04
17 lines
1610 bytes
On 08 Feb 2003 01:54:00 +0100, Dominique Devriese
<dominique.devriese@student.kuleuven.ac.be> wrote:
>  ik zou een utf8 karakter uit het tweede deel van het spectrum ( de
>  karakters van twee bytes lang, dus.. ) moeten in een C-string kunnen
>  zetten, maar ik vind het maar niet.  Iemand die weet hoe je
>  verondersteld wordt te escapen ?
>  vb. een string met de griekse letter theta in ( theta is 03B8 in utf8,
>  schijnt het )..

Ik denk dat je daarvoor wchar moet gebruiken (en zijn bijhorende functies
zoals wprintf en dergelijke).

Mvg,
	Sven Vermeulen

-- 
	Fighting for peace is like fucking for virginity.
Re: utf8 in C++
#5962
Author: Dominique Devriese
Date: Sun, 09 Feb 2003 19:10
21 lines
2123 bytes
Sven Vermeulen writes:

  Sven> On 08 Feb 2003 01:54:00 +0100, Dominique Devriese
  Sven> <dominique.devriese@student.kuleuven.ac.be> wrote:
  >> ik zou een utf8 karakter uit het tweede deel van het spectrum (
  >> de karakters van twee bytes lang, dus.. ) moeten in een C-string
  >> kunnen zetten, maar ik vind het maar niet.  Iemand die weet hoe
  >> je verondersteld wordt te escapen ?  vb. een string met de
  >> griekse letter theta in ( theta is 03B8 in utf8, schijnt het )..

  Sven> Ik denk dat je daarvoor wchar moet gebruiken (en zijn
  Sven> bijhorende functies zoals wprintf en dergelijke).

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.. 
sjuus
domi

-- 
If you can read this, you're too close.
Re: utf8 in C++
#5982
Author: 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
Re: utf8 in C++
#5905
Author: Dominique Devriese
Date: Sat, 15 Feb 2003 12:18
38 lines
2556 bytes
Nicolas Barbier writes:

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

  Nicolas> Ik veronderstel dat je 03B8 in Unicode bedoelt.

eh ja, sorry, ik ben een beetje in het duister aan het vissen, hoor..

  >> 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..

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

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

  Nicolas> 03B8 = 1110111000

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

  Nicolas> Maw "\xCE\xB8"

fantastisch, ga ik direct eens proberen..  bedankt, he
sjuus
domi

-- 
Q:	What's a light-year?
A:	One-third less calories than a regular year.
Re: utf8 in C++
#5908
Author: Dominique Devriese
Date: Sat, 15 Feb 2003 14:09
8 lines
1483 bytes
Nicolas Barbier writes:
  Nicolas> Maw "\xCE\xB8"

het werkt !! bedankt
domi
-- 
Q:	What do Winnie the Pooh and John the Baptist have in common?
A:	The same middle name.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads