From: Alan W. I. <ir...@be...> - 2014-09-23 15:39:16
|
On 2014-09-23 10:36-0000 Arjen Markus wrote: > Hi Phil, > I will definitely try these changes with Cygwin and MinGW. Pairs of functions for handling ASCII and UNICODE strings are ubiquitous under Windows and I do not expect trouble like Cygwin or MinGW not supporting the two flavours. Still, that needs to be checked. To Arjen and Phil: To interject one additional consideration here, user input to PLplot on both Unix and Windows should be in the UTF-8 encoding of unicode, but the actual strings containing those UTF-8 bytes are assumed by our code to be contained in ordinary char * strings and NOT wide characters. That's the whole point of UTF-8, it doesn't require wide characters to contain it. Instead, the number of UTF-8 characters encoded as bytes in a normal string is sometimes less (if two or more bytes are used in a character encoding) than the number of bytes in the string, but that is not an issue for us since all our string processing of user input simply requires a NULL byte at the end to mark the end of the UTF-8 string. Note, we actually do no internal text rendering using the raw user UTF-8 input. Instead, in all cases we immediately translate that char * user input from UTF-8 to PLUNICODE (32-byte integer) arrays, and use those PLUNICODE arrays internally for the text rendering. So I am virtually positive when there is a Windows macro choice between normal (so-called ascii) and wide characters anywhere in our code, than in most (or all?) cases, that choice should be replaced by the definite narrow version similar to the change Phil just did for the src/ltdl_win32.c case. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); the Time Ephemerides project (timeephem.sf.net); PLplot scientific plotting software package (plplot.sf.net); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ |