Strange Message in the Debug Area

My print handler causes a message in the last line which I can’t understand. Does anyone know what it means?
(The app operates without error !)


on doPrint(theView)
	set sharedPrintInfo to current application's class "NSPrintInfo"'s sharedPrintInfo()
	sharedPrintInfo's setLeftMargin_({20.0})
	sharedPrintInfo's setRightMargin_({0.0})
	sharedPrintInfo's setTopMargin_({20.0})
	sharedPrintInfo's setBottomMargin_({10.0})
	sharedPrintInfo's setOrientation_(0)
	sharedPrintInfo's setHorizontalPagination_(1)
	sharedPrintInfo's setVerticalPagination_(0)
	sharedPrintInfo's setVerticallyCentered_(0)
	sharedPrintInfo's setHorizontallyCentered_(1)
	sharedPrintInfo's setScalingFactor_({0.8})
	set thePrintOp to current application's class "NSPrintOperation"'s printOperationWithView_printInfo_(theView, sharedPrintInfo)
	set printSuccessful to thePrintOp's runOperation()  -- *)
	
	-- *) Incorrect NSStringEncoding value 0x0000 detected. Assuming NSASCIIStringEncoding. Will stop this compatiblity mapping behavior in the near future.

end doPrint


Heiner

Somewhere a method is passing 0 for NSStringEncoding, which is not a valid choice, and the receiver is assuming 1 was meant. If it’s not elsewhere in your code, it’s in the frameworks, which means there’s nothing you can do other than log it as a bug.

But I’m a bit surprised, because I’ve been doing stuff with printing myself lately, and haven’t seen such a message.

As an example of the error, if I run this:

current application's NSString's stringWithContentsOfFile_encoding_error_("/Users/shane/Desktop/Some file.txt", 0, reference)

I also get:

0000.001 Incorrect NSStringEncoding value 0x0000 detected. Assuming NSASCIIStringEncoding. Will stop this compatiblity mapping behavior in the near future.