Wednesday, June 22, 2005

Curses! ... WIDE curses.

Over the last couple weeks, I've been discovering that the business of writing wide-character programs that use curses is almost completely undocumented. I'm trying to figure this out because there are apparently some people who seem to like utf8, and I want them to stop bothering me :-). I was wondering if anyone out there has experience getting ncurses to play nicely with Unicode (or, I suppose, other wide character) locales, and if so, if there's any standard documentation that I could be pointed at. The ncurses manpages have some general information, but they're missing key details (for instance, what are the precise semantics of getcchar/setcchar, and what character encoding should I be passing into them?), and it looks like I'll probably have to dig through the library code to get real answers. *sigh*...

[UPDATE] the library code reveals that my worst fears are realized. getcchar/setcchar operate on whole strings. But, you see, they only let you pass in a single attribute/color value. So despite the fact that you're supposedly manipulating attributes combined with text (like chtype), you're actually unable to do anything more complicated than set the attributes of a whole string at once -- or carefully feed your data to curses one character at a time, generating pointless single-character strings to do so! Ewwwwwwwwwwwwwwwwwwwwwwwwwwwwwww.

[UPDATE 2] In the previous update, I somehow missed the prominent usages of CCHARW_MAX in getcchar() and setcchar(). setcchar errors out if there are more than CCHARW_MAX characters in the string, and getcchar never copies more than CCHARW_MAX characters from its input cchar_t to the output. (there seems to be some funny business going on with the number of wchar_t values in the string vs wcslen, but I could well just be confused)

5 Comments:

At 8:04 PM, Blogger oakleyses said...

uggs outlet, uggs on sale, ray ban sunglasses, ray ban sunglasses, louis vuitton, michael kors outlet online, oakley sunglasses wholesale, christian louboutin outlet, louis vuitton, uggs outlet, louis vuitton outlet, polo outlet, prada handbags, nike free, chanel handbags, longchamp outlet, michael kors outlet, replica watches, louis vuitton outlet, oakley sunglasses, michael kors outlet online, prada outlet, michael kors outlet online, longchamp outlet, burberry handbags, michael kors outlet, kate spade outlet, ray ban sunglasses, longchamp outlet, louis vuitton outlet, oakley sunglasses, nike air max, oakley sunglasses, replica watches, ugg boots, polo ralph lauren outlet online, ugg boots, gucci handbags, jordan shoes, cheap oakley sunglasses, michael kors outlet online, christian louboutin uk, burberry outlet, tory burch outlet, tiffany and co, christian louboutin shoes

 
At 8:06 PM, Blogger oakleyses said...

michael kors, nike tn, ralph lauren uk, abercrombie and fitch uk, north face uk, ray ban pas cher, nike free uk, lululemon canada, michael kors, true religion jeans, coach outlet, coach outlet store online, hollister uk, sac longchamp pas cher, vans pas cher, nike blazer pas cher, louboutin pas cher, nike air max uk, michael kors pas cher, nike free run, nike air max uk, new balance, sac hermes, jordan pas cher, true religion outlet, replica handbags, nike roshe, longchamp pas cher, guess pas cher, true religion outlet, north face, polo ralph lauren, coach purses, hollister pas cher, oakley pas cher, timberland pas cher, air max, polo lacoste, nike air force, nike roshe run uk, burberry pas cher, converse pas cher, nike air max, sac vanessa bruno, mulberry uk, hogan outlet, michael kors outlet, true religion outlet, ray ban uk, kate spade

 
At 8:10 PM, Blogger oakleyses said...

doudoune moncler, pandora uk, moncler outlet, vans, converse outlet, montre pas cher, louis vuitton, moncler, moncler, canada goose, canada goose outlet, ugg uk, links of london, barbour uk, supra shoes, replica watches, lancel, nike air max, moncler, moncler, moncler outlet, coach outlet, wedding dresses, canada goose outlet, pandora jewelry, karen millen uk, ugg, marc jacobs, juicy couture outlet, converse, moncler uk, louis vuitton, ugg pas cher, swarovski, pandora jewelry, gucci, canada goose, canada goose uk, ugg,uggs,uggs canada, pandora charms, juicy couture outlet, louis vuitton, louis vuitton, ray ban, ugg,ugg australia,ugg italia, canada goose jackets, swarovski crystal, canada goose, hollister, thomas sabo, canada goose outlet, toms shoes

 
At 8:37 PM, Blogger Unknown said...

nike air max 2015
nike air max 95
nike free 4.0
nike free trainer 5.0
christian louboutin outlet
Red Bottom Shoes For Women
mbt shoes sale
mbt shoes outlet
fitflops clearance
fitflops shoes
Nike Air Huaraches
Nike Huarache Nm
christian louboutin store
christian louboutin 2016
jordans 2016
jordan 13
new jordans
Air Jordan 4 Alternate 89
coach sale
coach outlet stores
kate spade
kate spade new york
michael kors
2015 michael kors outlet
Michael Kors Outlet Store
michael kors handbags outlet
michael kors sale
Michael Kors Sale
michael kors Premium Outlets
michael kors Chicago Premium Outlets

 
At 1:40 AM, Anonymous Obat Usus Buntu Tanpa Operasi said...

Thanks for the information, this is very useful. Allow me to share a health article here, which gods are beneficial to us. Thank you :)

Obat Herbal Penghancur Kista Ovarium
Obat Nyeri Tumit Tradisional
Cara Mengatasi Jantung Koroner secara Alami
Cara Menghilangkan Kelenjar Tiroid
Cara Mengatasi Sembelit atau Konstipasi

 

Post a Comment

<< Home