Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-31 Thread Jean-Daniel Dupas
Le 31 mars 2012 à 18:20, Andreas Grosam a écrit : > Thank you all for your answers and suggestions. > > My use case is to create CFStrings from Unicode - which in the majority of > cases are "short" strings - say, less than 100 characters. In this case, I > create an immutable CFString directl

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-31 Thread Andreas Grosam
Thank you all for your answers and suggestions. My use case is to create CFStrings from Unicode - which in the majority of cases are "short" strings - say, less than 100 characters. In this case, I create an immutable CFString directly in one go. Less frequently in the typical use case of the a

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-28 Thread Jean-Daniel Dupas
Le 28 mars 2012 à 20:00, Charles Srstka a écrit : > On Mar 28, 2012, at 9:55 AM, jonat...@mugginsoft.com wrote: > >> On 28 Mar 2012, at 15:35, Andreas Grosam wrote: >> >>> >>> On Mar 28, 2012, at 3:58 PM, jonat...@mugginsoft.com wrote: > I presume that you considered CFStringAppendCS

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-28 Thread Greg Parker
On Mar 28, 2012, at 11:00 AM, Charles Srstka wrote: > Unicode NULL is the least of your problems. In UTF16, each character in the > normal ASCII range is going to contain a zero as one of its two bytes (which > one, of course, depending on whether the encoding is big- or little-endian). > CFStr

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-28 Thread Charles Srstka
On Mar 28, 2012, at 9:55 AM, jonat...@mugginsoft.com wrote: > On 28 Mar 2012, at 15:35, Andreas Grosam wrote: > >> >> On Mar 28, 2012, at 3:58 PM, jonat...@mugginsoft.com wrote: >>> I presume that you considered CFStringAppendCString(): >>> >>> void CFStringAppendCString ( >>> CFMutableSt

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-28 Thread jonat...@mugginsoft.com
On 28 Mar 2012, at 15:35, Andreas Grosam wrote: > > On Mar 28, 2012, at 3:58 PM, jonat...@mugginsoft.com wrote: >>> >> I presume that you considered CFStringAppendCString(): >> >> void CFStringAppendCString ( >> CFMutableStringRef theString, >> const char *cStr, >> CFStringEncoding encoding

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-28 Thread Andreas Grosam
On Mar 28, 2012, at 3:58 PM, jonat...@mugginsoft.com wrote: > > On 28 Mar 2012, at 14:35, Andreas Grosam wrote: > >> What's the preferred method to append a sequence of bytes in encoding >> 'encoding' (a CFStringEncoding) to a CFMutableString object? >> >> Well, the set of encodings which I'm

Re: Best Way to Append Bytes With Encoding To CFMutableString

2012-03-28 Thread jonat...@mugginsoft.com
On 28 Mar 2012, at 14:35, Andreas Grosam wrote: > What's the preferred method to append a sequence of bytes in encoding > 'encoding' (a CFStringEncoding) to a CFMutableString object? > > Well, the set of encodings which I'm interested in are the Unicode encoding > schemes (UTF-8, UTF-16, UTF-

Best Way to Append Bytes With Encoding To CFMutableString

2012-03-28 Thread Andreas Grosam
What's the preferred method to append a sequence of bytes in encoding 'encoding' (a CFStringEncoding) to a CFMutableString object? Well, the set of encodings which I'm interested in are the Unicode encoding schemes (UTF-8, UTF-16, UTF-16LE, UTF-16BE, etc) Unfortunately, there is no CFStringApp