print.c:
* Use utf16_output to output strings as utf8 instead of raw utf16.
interr.c:
* Make utf16_output public instead of static.
interr.h:
* Declare utf16_output.
* Send the utf-16 Lisp unicode string to standard output as a
* utf8-encoded sequence of octets.
*/
-static void
+void
utf16_output(unsigned short int* utf16, int len)
{
while (len) {
extern void set_lossage_handler(void fun(void));
extern void internal_error(os_context_t * context);
+extern void utf16_output(unsigned short int* utf16, int len);
extern lispobj debug_print(lispobj string);
#endif /* _INTERR_H_ */
uint16_t *charptr = (uint16_t *) vector->data;
int len = fixnum_value(vector->length);
- while (len-- > 0) {
- if (*charptr == '"') {
- putchar('\\');
- }
- /* Just dump out the UTF-16 data */
- fwrite(charptr, sizeof(*charptr), 1, stdout);
- charptr++;
- }
+ utf16_output(charptr, len);
#endif
}