Bug 76453 [Encodings] Open properties fills log with encoding messages
I20041013 Every time I open the properties for a file it writes the following entries to .log (and also messages to the console): !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.328 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.328 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.338 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.338 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.338 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.348 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.348 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.358 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.358 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.358 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.368 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.368 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.378 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.378 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.388 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.388 !MESSAGE null is not a valid charset. !ENTRY org.eclipse.ui 4 4 Okt 18, 2004 10:21:41.388 !MESSAGE null is not a valid charset.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/IDEEncoding.java
IDEWorkbenchPlugin.getDefault().getPreferenceStore().setToDefault(
				IDE_ENCODINGS_PREFERENCE);
	}
	/**
	 * Get the displayable string for the byte order marking from the supplied
	 * file description.
	 * 
	 * @param description
	 *            The description to query. May be <code>null</code>.
	 * @return String or <code>null</code> if the byte order mark cannot be
	 *         found or the description is <code>null</code>.
	 * @see IContentDescription#getProperty(org.eclipse.core.runtime.QualifiedName)
	 */
	public static String getByteOrderMarkLabel(IContentDescription description) {
		if (description == null)
			return null;
		byte[] bom = (byte[]) description
				.getProperty(IContentDescription.BYTE_ORDER_MARK);
		if (bom == null)
			return (String) description
					.getProperty(IContentDescription.CHARSET);
		if (bom == IContentDescription.BOM_UTF_8)
			return IDEEncoding.BOM_UTF_8;
		if (bom == IContentDescription.BOM_UTF_16BE)
			return IDEEncoding.BOM_UTF_16BE;
		if (bom == IContentDescription.BOM_UTF_16LE)
			return IDEEncoding.BOM_UTF_16LE;
		return null;
	}
}