News for hackers. Stuff that matters.
Re:Printable True Bugs Wait Posters by dllthomas on Friday January 31, 2014 @11:18AM (#7157380)
If you're able, don't treat text as zero-terminated char arrays. Ideally, you'd have a well fleshed-out library for encoding-aware ropes.
Re:Printable True Bugs Wait Posters by Arnor on Friday January 31, 2014 @11:51AM (#7157552)
Which libraries do you recommend?
Re:Printable True Bugs Wait Posters by dllthomas on Friday January 31, 2014 @12:06PM (#7157657)
Unfortunately, I don't know of one. My recent C work has worked with text only in a very limited capacity (parsing and building packets in an ascii format - for the later, vectorized write buffers are a poor-man's ropes).

Edited to add:

Apparently there is this: http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/cordh...

Re:Printable True Bugs Wait Posters by oofabz on Friday January 31, 2014 @05:17PM (#7159550)
I recommend bstring for length-prefixed strings in C:

http://bstring.sourceforge.net/

Re:Printable True Bugs Wait Posters by clarry on Sunday February 02, 2014 @04:34AM (#7165453)
Bstring relies on undefined behavior for security. Don't use it if you care about security.