- c = *src++;
- if (c == '\n')
- {
- if (eol_type != EOL_LF && eol_type != EOL_AUTODETECT)
- Dynarr_add (dst, '\r');
- if (eol_type != EOL_CR)
- Dynarr_add (dst, '\n');
- }
- else if (BYTE_ASCII_P (c))
+ if (eol_type != EOL_LF && eol_type != EOL_AUTODETECT)
+ Dynarr_add (dst, '\r');
+ if (eol_type != EOL_CR)
+ Dynarr_add (dst, ch);
+ }
+ else
+ {
+#ifdef UTF2000
+ int code_point;
+ Lisp_Object ccs
+ = CODING_SYSTEM_ISO2022_INITIAL_CHARSET (str->codesys, 1);
+
+ if ((code_point = charset_code_point (Vcharset_ascii, ch)) >= 0)
+ Dynarr_add (dst, code_point);
+ else if ((code_point = charset_code_point (ccs, ch)) >= 0)