Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > about string and character

Reply
Thread Tools

about string and character

 
 
CBFalconer
Guest
Posts: n/a
 
      11-24-2007
Chris Dollin wrote:
> lovecreatesbea...@gmail.com wrote:
>
>> This string "0" consists of two characters.

>
> The nul terminator isn't one of the X-Mozilla-Status: 0009ng.


But it IS one of the characters in the char array holding the
string.

--
Chuck F (cbfalconer at maineline dot net)
<http://cbfalconer.home.att.net>
Try the download section.



--
Posted via a free Usenet account from http://www.teranews.com

 
Reply With Quote
 
 
 
 
Barry Schwarz
Guest
Posts: n/a
 
      11-25-2007
On Sat, 24 Nov 2007 01:27:26 -0800 (PST), ""
<> wrote:

>what is the difference between a single character and a string
>consisting only one character


Since a string must be terminated with a '\0', the only possible
1-character string is "". If instead you meant a string whose length
is 1, then such a string obviously contains two characters.

A single character can contain any one of at least 256 possible
values.


Remove del for email
 
Reply With Quote
 
 
 
 
Chris Dollin
Guest
Posts: n/a
 
      11-25-2007
CBFalconer wrote:

> Chris Dollin wrote:
>> lovecreatesbea...@gmail.com wrote:
>>
>>> This string "0" consists of two characters.

>>
>> The nul terminator isn't one of the X-Mozilla-Status: 0009ng.


Urm -- what happened there?

> But it IS one of the characters in the char array holding the
> string.


Oh, yes.
Elsethread $)CHarald van D )& k <> (and
what happened /there/? Is my newsgarbler doing something
odd to names & content?) remarks

| From a standards perspective:
| A string is defined as "a contiguous sequence of characters
| terminated by and including the first null character".

which would make my position unsupported by the Standard's
terminology.

--
One-Hand Hedgehog
Notmuchhere: http://www.electrichedgehog.net/

 
Reply With Quote
 
santosh
Guest
Posts: n/a
 
      11-25-2007
In article <WMa2j.152625$> , Chris
Dollin <> wrote on Sunday 25 Nov 2007 2:26 pm:

> CBFalconer wrote:
>
>> Chris Dollin wrote:
>>> lovecreatesbea...@gmail.com wrote:
>>>
>>>> This string "0" consists of two characters.
>>>
>>> The nul terminator isn't one of the X-Mozilla-Status: 0009ng.

>
> Urm -- what happened there?
>
>> But it IS one of the characters in the char array holding the
>> string.

>
> Oh, yes.
> Elsethread $)CHarald van D )& k <> (and
> what happened /there/? Is my newsgarbler doing something
> odd to names & content?) remarks


No. His name appears mangled on my newsserver/newsreader too. I suspect
that he is using an encoding not supported by some software in the
Usenet hierarchy.

It was fine when Harald started posting to this group, but for a few
months now, his name has not been displayed properly.

> | From a standards perspective:
> | A string is defined as "a contiguous sequence of characters
> | terminated by and including the first null character".
>
> which would make my position unsupported by the Standard's
> terminology.


Yes. So my first post contains errors. Hopefully the OP would have read
far enough into the thread to note the corrections.

 
Reply With Quote
 
santosh
Guest
Posts: n/a
 
      11-25-2007
In article <fibrpm$mco$>, Harald van D?k
<> wrote on Sunday 25 Nov 2007 6:32 pm:

> On Sun, 25 Nov 2007 12:32:13 +0000, Harald van D?k wrote:
>> On Sun, 25 Nov 2007 14:47:18 +0530, santosh wrote:
>>> It was fine when Harald started posting to this group, but for a few
>>> months now, his name has not been displayed properly.

>>
>> Apparently KNode encoded my name in utf-8, but Pan encodes it in
>> iso-2022-kr. I'll check if there's an option to change that.

>
> Does it display better like this?


Yes. It is now displayed correctly.

 
Reply With Quote
 
James Kuyper
Guest
Posts: n/a
 
      11-25-2007
Harald van Dijk wrote:
> On Sun, 25 Nov 2007 12:32:13 +0000, Harald van Dijk wrote:
>> On Sun, 25 Nov 2007 14:47:18 +0530, santosh wrote:
>>> It was fine when Harald started posting to this group, but for a few
>>> months now, his name has not been displayed properly.

>> Apparently KNode encoded my name in utf-8, but Pan encodes it in
>> iso-2022-kr. I'll check if there's an option to change that.

>
> Does it display better like this?


Yes.
 
Reply With Quote
 
$)CHarald van D)&k
Guest
Posts: n/a
 
      11-25-2007
On Sun, 25 Nov 2007 14:47:18 +0530, santosh wrote:
> In article <WMa2j.152625$> , Chris
> Dollin <> wrote on Sunday 25 Nov 2007 2:26 pm:
>> Oh, yes.
>> Elsethread $)CHarald van D )& k <> (and what
>> happened /there/? Is my newsgarbler doing something odd to names &
>> content?) remarks

>
> No. His name appears mangled on my newsserver/newsreader too. I suspect
> that he is using an encoding not supported by some software in the
> Usenet hierarchy.
>
> It was fine when Harald started posting to this group, but for a few
> months now, his name has not been displayed properly.


Apparently KNode encoded my name in utf-8, but Pan encodes it in iso-2022-
kr. I'll check if there's an option to change that.
 
Reply With Quote
 
Richard Heathfield
Guest
Posts: n/a
 
      11-25-2007
Harald van D?k said:

> On Sun, 25 Nov 2007 12:32:13 +0000, Harald van D?k wrote:
>> On Sun, 25 Nov 2007 14:47:18 +0530, santosh wrote:
>>> It was fine when Harald started posting to this group, but for a few
>>> months now, his name has not been displayed properly.

>>
>> Apparently KNode encoded my name in utf-8, but Pan encodes it in
>> iso-2022-kr. I'll check if there's an option to change that.

>
> Does it display better like this?


Yes. But you're still going to have problems with the i-j ligature (or
diphthong, or whatever the proper name is).

--
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 
Reply With Quote
 
Harald van Dijk
Guest
Posts: n/a
 
      11-25-2007
On Sun, 25 Nov 2007 12:32:13 +0000, Harald van Dijk wrote:
> On Sun, 25 Nov 2007 14:47:18 +0530, santosh wrote:
>> It was fine when Harald started posting to this group, but for a few
>> months now, his name has not been displayed properly.

>
> Apparently KNode encoded my name in utf-8, but Pan encodes it in
> iso-2022-kr. I'll check if there's an option to change that.


Does it display better like this?
 
Reply With Quote
 
santosh
Guest
Posts: n/a
 
      11-25-2007
In article <fibo1c$sk3$>, santosh
<> wrote on Sunday 25 Nov 2007 5:28 pm:

> In article <fibrpm$mco$>, Harald van D?k
> <> wrote on Sunday 25 Nov 2007 6:32 pm:
>
>> On Sun, 25 Nov 2007 12:32:13 +0000, Harald van D?k wrote:
>>> On Sun, 25 Nov 2007 14:47:18 +0530, santosh wrote:
>>>> It was fine when Harald started posting to this group, but for a
>>>> few months now, his name has not been displayed properly.
>>>
>>> Apparently KNode encoded my name in utf-8, but Pan encodes it in
>>> iso-2022-kr. I'll check if there's an option to change that.

>>
>> Does it display better like this?

>
> Yes. It is now displayed correctly.


Oops. It was correct when I received and replied to it, but not when I
read it back, as you can see.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert string with control character in caret notation to realcontrol character string. Bart Vandewoestyne C Programming 8 09-25-2012 12:41 PM
FAQ 4.31 How can I split a [character] delimited string except when inside [character]? PerlFAQ Server Perl Misc 0 01-25-2011 05:00 AM
How can I replace all occurrences of a character with another character in std string? herman C++ 5 08-30-2007 09:05 AM
8 bit character string to 16 bit character string Brand Bogard C Programming 8 05-28-2006 05:05 PM
getting the character code of a character in a string Velvet ASP .Net 9 01-19-2006 09:27 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57