+/* Returns the encoding of characters read from HANDLE. */
+enum legacy_encoding
+fh_get_legacy_encoding (const struct file_handle *handle)
+{
+ assert (handle->referent & (FH_REF_FILE | FH_REF_INLINE));
+ return (handle->referent == FH_REF_FILE ? handle->encoding : LEGACY_NATIVE);
+}
+