Bug 73656 Encoding: refactoring should flush the undo stack on encoding changes
Refactoring should flush the undo stack on encoding changes. It is questionable what to do if the encoding changes since the encoding has an impact on the number of characters. Alternativly the UndoTectFileChange could remember the encoding and could compare it in isValid(...).
org.eclipse.ltk.core.refactoring/src/org/eclipse/ltk/internal/core/refactoring/BufferValidationState.java
if (fModificationStamp.getValue() != currentStamp.getValue()
			 
			
			|| (fModificationStamp.isFileStamp() 
				&& fModificationStamp.getValue() == IResource.NULL_STAMP 
				&& !currentStamp.isFileStamp())
			|| (fModificationStamp.isDocumentStamp() 
				&& fModificationStamp.getValue() == IDocumentExtension4.UNKNOWN_MODIFICATION_STAMP 
				&& !currentStamp.isDocumentStamp())
			|| (fModificationStamp.isFileStamp() 
				&& currentStamp.isFileStamp() && isDirty(fFile))) {
			result.addFatalError(Messages.format(
				RefactoringCoreMessages.TextChanges_error_content_changed, 
				fFile.getFullPath().toString()
				)); 
			
		}
		return result;
	}
}
/*
class SavedBufferValidationState extends BufferValidationState {
	private long fModificationStamp;
	
	public SavedBufferValidationState(IFile file) {
		super(file);
		fModificationStamp= file.getModificationStamp();
	}
	public RefactoringStatus isValid(boolean needsSaving) {