[mw-devel] CVS Update at silver.sucs.org: mw

Peter Berry pwb at sucs.org
Mon Jul 11 01:58:03 BST 2005


On Mon, 11 Jul 2005, Peter Berry wrote:

> 	main.c: display_message now correctly handles multibyte strings.
> 	Since this was done with UTF-8 in mind, it's possible other
> 	multibyte encodings might still be handled incorrectly, but I
> 	don't know of any :)

The data written onto the pipes is in the same encoding as display_message 
uses, which is determined by the locale. This will cause lossage when any 
of the mw processes uses a locale different from any of the others and 
sends them incompatible characters. (This is actually not a new problem 
since different single-byte encodings already got their data 
misinterpreted.)

In future we should probably standardise on Unicode (using wchar_t values) 
for interprocess communications (and other internal uses where it's not 
too much effort) and convert to the local encoding on user I/O (which will 
also cause information loss, but we can't do anything about that).

-- 
Peter Berry, SUCS Ex-Treasurer
<pwb at sucs.org>



More information about the mw-devel mailing list