+/* Encode the string STR using the specified coding system
+ for system functions, if any. */
+#define ENCODE_SYSTEM(str) \
+ (! NILP (Vlocale_coding_system) \
+ && !EQ (Vlocale_coding_system, make_number (0)) \
+ ? code_convert_string_norecord (str, Vlocale_coding_system, 1) \
+ : str)
+
+/* Decode the string STR using the specified coding system
+ for system functions, if any. */
+#define DECODE_SYSTEM(str) \
+ (! NILP (Vlocale_coding_system) \
+ && !EQ (Vlocale_coding_system, make_number (0)) \
+ ? code_convert_string_norecord (str, Vlocale_coding_system, 0) \
+ : str)
+
+#define ENCODE_UTF_8(str) code_convert_string_norecord (str, Qutf_8, 1)
+