int cnt; /* Number of changes made. */
int size; /* Size of translate table. */
int pos;
+ int multibyte = !NILP (current_buffer->enable_multibyte_characters);
validate_region (&start, &end);
CHECK_STRING (table, 2);
int oc;
int pos_byte_next;
- oc = STRING_CHAR_AND_LENGTH (p, stop - pos_byte, len);
+ if (multibyte)
+ oc = STRING_CHAR_AND_LENGTH (p, stop - pos_byte, len);
+ else
+ oc = *p, len = 1;
pos_byte_next = pos_byte + len;
if (oc < size && len == 1)
{