@@ -1235,10 +1235,21 @@ CL_DEFUN Integer_sp cl__write_byte(Integer_sp byte, T_sp stream) {
1235
1235
CL_LAMBDA (string &optional output-stream);
1236
1236
CL_DOCSTRING (R"dx( Outputs character to output-stream.)dx" );
1237
1237
CL_DEFUN Character_sp cl__write_char (Character_sp chr, T_sp output_stream) {
1238
+ Character_sp r = chr;
1238
1239
stream_write_char (coerce::outputStreamDesignator (output_stream), clasp_as_claspCharacter (chr));
1239
- return chr ;
1240
+ return r ;
1240
1241
};
1241
1242
1243
+
1244
+ CL_LAMBDA (string &optional output-stream);
1245
+ CL_DOCSTRING (R"dx( Outputs character to output-stream.)dx" );
1246
+ CL_DEFUN Character_sp core__write_char_beta (Character_sp chr, T_sp output_stream) {
1247
+ Character_sp r = chr;
1248
+ stream_write_char (coerce::outputStreamDesignator (output_stream), clasp_as_claspCharacter (chr));
1249
+ return r;
1250
+ };
1251
+
1252
+
1242
1253
CL_LAMBDA (&optional input-stream);
1243
1254
CL_DOCSTRING (R"dx( Clears any available input from input-stream.
1244
1255
@@ -3129,10 +3140,10 @@ int TwoWayStream_O::file_descriptor(StreamDirection direction) const {
3129
3140
}
3130
3141
3131
3142
/* Maximum number of bytes required to encode a character.
3132
- * This currently corresponds to (4 + 2 ) for the ISO-2022-JP-* encodings
3133
- * with 4 being the charset prefix, 2 for the character.
3143
+ * This currently corresponds to (4 + 4 ) for the UCS-4 encoding
3144
+ * with 4 being the byte-order mark, 4 for the character.
3134
3145
*/
3135
- #define ENCODING_BUFFER_MAX_SIZE 6
3146
+ #define ENCODING_BUFFER_MAX_SIZE 8
3136
3147
/* Size of the encoding buffer for vectors */
3137
3148
#define VECTOR_ENCODING_BUFFER_SIZE 2048
3138
3149
0 commit comments