On Sat, Oct 09, 2010 at 10:40:21AM +0200, Sigurd Mytting wrote:
upgraded to 3.6.0 yesterday - it looks great!
Thanks :)
But there is a small problem: it seems mcc won't handle norwegian characters in port descriptions.
2010-10-09 09:35:58,708: [ERROR] nav.mcc.utils - Could not encode KVM Str�mskinne 1 to latin-1: 'latin-1' codec can't encode character u'\ufffd' in position 7: ordinal not in range(256)
The unicode character U+FFFD is not a Norwegian character. It's description is "Replacement character", and for me it renders like a diamond with a question mark in it. It has no equivalent character in the ISO-8859-1 (Latin-1) character set, and that is why the encoding fails. Cricket's configuration will only accept Latin-1 characters.
I don't really care about the description beeing correctly displayed, but mcc stops after this and no more cricket config is generated.
Since this is only for display purposes, I think a more elegant solution would be to just ignore characters that can't be encoded as latin-1. This can easily be achieved by replacing encode('latin-1') with encode('latin-1', 'ignore').
Could you please report this bug at https://bugs.launchpad.net/nav/+filebug ?