2007-08-25 04:14:26 +00:00
|
|
|
/**********************************************************************
|
|
|
|
|
|
|
|
encoding.h -
|
|
|
|
|
|
|
|
$Author: matz $
|
|
|
|
created at: Thu May 24 11:49:41 JST 2007
|
|
|
|
|
|
|
|
Copyright (C) 2007 Yukihiro Matsumoto
|
|
|
|
|
|
|
|
**********************************************************************/
|
|
|
|
|
|
|
|
#ifndef RUBY_ENCODING_H
|
|
|
|
#define RUBY_ENCODING_H 1
|
|
|
|
|
2008-06-10 02:24:45 +00:00
|
|
|
#include <stdarg.h>
|
2007-08-25 04:14:26 +00:00
|
|
|
#include "ruby/oniguruma.h"
|
|
|
|
|
2007-12-21 11:00:04 +00:00
|
|
|
#define ENCODING_INLINE_MAX 1023
|
|
|
|
#define ENCODING_SHIFT (FL_USHIFT+10)
|
|
|
|
#define ENCODING_MASK (ENCODING_INLINE_MAX<<ENCODING_SHIFT)
|
2008-01-07 02:49:01 +00:00
|
|
|
|
|
|
|
#define ENCODING_SET_INLINED(obj,i) do {\
|
2007-08-25 04:14:26 +00:00
|
|
|
RBASIC(obj)->flags &= ~ENCODING_MASK;\
|
2008-01-07 02:49:01 +00:00
|
|
|
RBASIC(obj)->flags |= (i) << ENCODING_SHIFT;\
|
|
|
|
} while (0)
|
|
|
|
#define ENCODING_SET(obj,i) do {\
|
|
|
|
VALUE rb_encoding_set_obj = (obj); \
|
|
|
|
int encoding_set_enc_index = (i); \
|
|
|
|
if (encoding_set_enc_index < ENCODING_INLINE_MAX) \
|
|
|
|
ENCODING_SET_INLINED(rb_encoding_set_obj, encoding_set_enc_index); \
|
|
|
|
else \
|
2008-05-19 08:25:03 +00:00
|
|
|
rb_enc_set_index(rb_encoding_set_obj, encoding_set_enc_index); \
|
2007-08-25 04:14:26 +00:00
|
|
|
} while (0)
|
2008-01-07 02:49:01 +00:00
|
|
|
|
|
|
|
#define ENCODING_GET_INLINED(obj) ((RBASIC(obj)->flags & ENCODING_MASK)>>ENCODING_SHIFT)
|
|
|
|
#define ENCODING_GET(obj) \
|
|
|
|
(ENCODING_GET_INLINED(obj) != ENCODING_INLINE_MAX ? \
|
|
|
|
ENCODING_GET_INLINED(obj) : \
|
2008-05-19 08:25:03 +00:00
|
|
|
rb_enc_get_index(obj))
|
2008-01-07 02:49:01 +00:00
|
|
|
|
|
|
|
#define ENCODING_IS_ASCII8BIT(obj) (ENCODING_GET_INLINED(obj) == 0)
|
2007-08-25 04:14:26 +00:00
|
|
|
|
2008-01-16 05:55:22 +00:00
|
|
|
#define ENCODING_MAXNAMELEN 42
|
|
|
|
|
2007-12-21 11:00:04 +00:00
|
|
|
#define ENC_CODERANGE_MASK (FL_USER8|FL_USER9)
|
2007-09-26 19:46:58 +00:00
|
|
|
#define ENC_CODERANGE_UNKNOWN 0
|
2007-12-21 11:00:04 +00:00
|
|
|
#define ENC_CODERANGE_7BIT FL_USER8
|
|
|
|
#define ENC_CODERANGE_VALID FL_USER9
|
|
|
|
#define ENC_CODERANGE_BROKEN (FL_USER8|FL_USER9)
|
2007-09-26 19:46:58 +00:00
|
|
|
#define ENC_CODERANGE(obj) (RBASIC(obj)->flags & ENC_CODERANGE_MASK)
|
2007-11-27 02:21:17 +00:00
|
|
|
#define ENC_CODERANGE_ASCIIONLY(obj) (ENC_CODERANGE(obj) == ENC_CODERANGE_7BIT)
|
2007-09-30 08:13:28 +00:00
|
|
|
#define ENC_CODERANGE_SET(obj,cr) (RBASIC(obj)->flags = \
|
|
|
|
(RBASIC(obj)->flags & ~ENC_CODERANGE_MASK) | (cr))
|
2007-09-26 19:46:58 +00:00
|
|
|
#define ENC_CODERANGE_CLEAR(obj) ENC_CODERANGE_SET(obj,0)
|
2008-02-17 13:01:52 +00:00
|
|
|
|
|
|
|
/* assumed ASCII compatiblity */
|
|
|
|
#define ENC_CODERANGE_AND(a, b) \
|
|
|
|
(a == ENC_CODERANGE_7BIT ? b : \
|
|
|
|
a == ENC_CODERANGE_VALID ? (b == ENC_CODERANGE_7BIT ? ENC_CODERANGE_VALID : b) : \
|
|
|
|
ENC_CODERANGE_UNKNOWN)
|
2007-09-26 19:46:58 +00:00
|
|
|
|
2008-01-07 02:49:01 +00:00
|
|
|
#define ENCODING_CODERANGE_SET(obj, encindex, cr) \
|
|
|
|
do { \
|
|
|
|
VALUE rb_encoding_coderange_obj = (obj); \
|
|
|
|
ENCODING_SET(rb_encoding_coderange_obj, (encindex)); \
|
|
|
|
ENC_CODERANGE_SET(rb_encoding_coderange_obj, (cr)); \
|
|
|
|
} while (0)
|
2007-09-26 19:46:58 +00:00
|
|
|
|
2007-08-25 04:14:26 +00:00
|
|
|
typedef OnigEncodingType rb_encoding;
|
|
|
|
|
2007-12-10 12:47:55 +00:00
|
|
|
int rb_enc_replicate(const char *, rb_encoding *);
|
2007-12-21 11:00:04 +00:00
|
|
|
int rb_define_dummy_encoding(const char *);
|
2008-07-04 11:44:05 +00:00
|
|
|
#define rb_enc_to_index(enc) ((enc) ? ENC_TO_ENCINDEX(enc) : 0)
|
2007-09-26 09:39:08 +00:00
|
|
|
int rb_enc_get_index(VALUE obj);
|
2008-05-19 08:25:03 +00:00
|
|
|
void rb_enc_set_index(VALUE obj, int encindex);
|
2007-09-28 19:27:10 +00:00
|
|
|
int rb_enc_find_index(const char *name);
|
2007-10-13 16:32:40 +00:00
|
|
|
int rb_to_encoding_index(VALUE);
|
|
|
|
rb_encoding* rb_to_encoding(VALUE);
|
2007-08-25 04:14:26 +00:00
|
|
|
rb_encoding* rb_enc_get(VALUE);
|
2007-10-22 01:57:08 +00:00
|
|
|
rb_encoding* rb_enc_compatible(VALUE,VALUE);
|
2007-08-25 04:14:26 +00:00
|
|
|
rb_encoding* rb_enc_check(VALUE,VALUE);
|
2008-05-20 22:26:14 +00:00
|
|
|
VALUE rb_enc_associate_index(VALUE, int);
|
|
|
|
VALUE rb_enc_associate(VALUE, rb_encoding*);
|
2007-12-28 14:55:43 +00:00
|
|
|
void rb_enc_copy(VALUE dst, VALUE src);
|
2007-08-25 04:14:26 +00:00
|
|
|
|
2008-01-04 16:30:33 +00:00
|
|
|
VALUE rb_enc_str_new(const char*, long, rb_encoding*);
|
|
|
|
VALUE rb_enc_reg_new(const char*, long, rb_encoding*, int);
|
2007-12-30 21:08:36 +00:00
|
|
|
PRINTF_ARGS(VALUE rb_enc_sprintf(rb_encoding *, const char*, ...), 2, 3);
|
|
|
|
VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list);
|
2007-08-25 04:14:26 +00:00
|
|
|
long rb_enc_strlen(const char*, const char*, rb_encoding*);
|
|
|
|
char* rb_enc_nth(const char*, const char*, int, rb_encoding*);
|
2007-10-04 06:57:19 +00:00
|
|
|
VALUE rb_obj_encoding(VALUE);
|
2008-01-06 09:25:09 +00:00
|
|
|
VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc);
|
2007-08-25 04:14:26 +00:00
|
|
|
|
|
|
|
/* index -> rb_encoding */
|
|
|
|
rb_encoding* rb_enc_from_index(int idx);
|
|
|
|
|
|
|
|
/* name -> rb_encoding */
|
|
|
|
rb_encoding * rb_enc_find(const char *name);
|
|
|
|
|
|
|
|
/* encoding -> name */
|
|
|
|
#define rb_enc_name(enc) (enc)->name
|
|
|
|
|
|
|
|
/* encoding -> minlen/maxlen */
|
|
|
|
#define rb_enc_mbminlen(enc) (enc)->min_enc_len
|
|
|
|
#define rb_enc_mbmaxlen(enc) (enc)->max_enc_len
|
|
|
|
|
2007-12-23 15:19:23 +00:00
|
|
|
/* -> mbclen (no error notification: 0 < ret <= e-p, no exception) */
|
2007-12-23 14:06:00 +00:00
|
|
|
int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc);
|
2007-08-27 13:48:09 +00:00
|
|
|
|
2007-12-11 03:08:50 +00:00
|
|
|
/* -> chlen, invalid or needmore */
|
|
|
|
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc);
|
2008-01-27 14:27:07 +00:00
|
|
|
#define MBCLEN_CHARFOUND_P(ret) ONIGENC_MBCLEN_CHARFOUND_P(ret)
|
|
|
|
#define MBCLEN_CHARFOUND_LEN(ret) ONIGENC_MBCLEN_CHARFOUND_LEN(ret)
|
|
|
|
#define MBCLEN_INVALID_P(ret) ONIGENC_MBCLEN_INVALID_P(ret)
|
|
|
|
#define MBCLEN_NEEDMORE_P(ret) ONIGENC_MBCLEN_NEEDMORE_P(ret)
|
|
|
|
#define MBCLEN_NEEDMORE_LEN(ret) ONIGENC_MBCLEN_NEEDMORE_LEN(ret)
|
2007-12-06 09:28:26 +00:00
|
|
|
|
2007-12-11 03:08:50 +00:00
|
|
|
/* -> 0x00..0x7f, -1 */
|
2007-12-11 07:39:16 +00:00
|
|
|
int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc);
|
2007-12-08 02:50:43 +00:00
|
|
|
|
2007-12-23 15:19:23 +00:00
|
|
|
/* -> code or raise exception */
|
|
|
|
int rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc);
|
2007-12-25 10:01:06 +00:00
|
|
|
#define rb_enc_mbc_to_codepoint(p, e, enc) ONIGENC_MBC_TO_CODE(enc,(UChar*)(p),(UChar*)(e))
|
2007-12-23 15:19:23 +00:00
|
|
|
|
2007-12-27 06:27:39 +00:00
|
|
|
/* -> codelen>0 or raise exception */
|
2007-12-23 14:06:00 +00:00
|
|
|
int rb_enc_codelen(int code, rb_encoding *enc);
|
2007-08-25 04:14:26 +00:00
|
|
|
|
|
|
|
/* code,ptr,encoding -> write buf */
|
2007-12-25 10:01:06 +00:00
|
|
|
#define rb_enc_mbcput(c,buf,enc) ONIGENC_CODE_TO_MBC(enc,c,(UChar*)(buf))
|
2007-08-25 04:14:26 +00:00
|
|
|
|
|
|
|
/* ptr, ptr, encoding -> prev_char */
|
2007-12-25 10:01:06 +00:00
|
|
|
#define rb_enc_prev_char(s,p,enc) (char *)onigenc_get_prev_char_head(enc,(UChar*)(s),(UChar*)(p))
|
2007-12-24 16:36:14 +00:00
|
|
|
/* ptr, ptr, encoding -> next_char */
|
2007-12-25 10:01:06 +00:00
|
|
|
#define rb_enc_left_char_head(s,p,enc) (char *)onigenc_get_left_adjust_char_head(enc,(UChar*)(s),(UChar*)(p))
|
|
|
|
#define rb_enc_right_char_head(s,p,enc) (char *)onigenc_get_right_adjust_char_head(enc,(UChar*)(s),(UChar*)(p))
|
2007-08-25 04:14:26 +00:00
|
|
|
|
2008-01-21 19:47:26 +00:00
|
|
|
/* ptr, ptr, encoding -> newline_or_not */
|
2008-01-24 09:19:44 +00:00
|
|
|
#define rb_enc_is_newline(p,end,enc) ONIGENC_IS_MBC_NEWLINE(enc,(UChar*)(p),(UChar*)(end))
|
2008-01-21 19:47:26 +00:00
|
|
|
|
2007-09-28 19:27:10 +00:00
|
|
|
#define rb_enc_isctype(c,t,enc) ONIGENC_IS_CODE_CTYPE(enc,c,t)
|
2007-08-25 04:14:26 +00:00
|
|
|
#define rb_enc_isascii(c,enc) ONIGENC_IS_CODE_ASCII(c)
|
|
|
|
#define rb_enc_isalpha(c,enc) ONIGENC_IS_CODE_ALPHA(enc,c)
|
|
|
|
#define rb_enc_islower(c,enc) ONIGENC_IS_CODE_LOWER(enc,c)
|
|
|
|
#define rb_enc_isupper(c,enc) ONIGENC_IS_CODE_UPPER(enc,c)
|
2008-08-14 08:57:07 +00:00
|
|
|
#define rb_enc_ispunct(c,enc) ONIGENC_IS_CODE_PUNCT(enc,c)
|
2007-08-25 04:14:26 +00:00
|
|
|
#define rb_enc_isalnum(c,enc) ONIGENC_IS_CODE_ALNUM(enc,c)
|
|
|
|
#define rb_enc_isprint(c,enc) ONIGENC_IS_CODE_PRINT(enc,c)
|
|
|
|
#define rb_enc_isspace(c,enc) ONIGENC_IS_CODE_SPACE(enc,c)
|
|
|
|
#define rb_enc_isdigit(c,enc) ONIGENC_IS_CODE_DIGIT(enc,c)
|
|
|
|
|
2008-05-19 08:25:03 +00:00
|
|
|
#define rb_enc_asciicompat(enc) (rb_enc_mbminlen(enc)==1 && !rb_enc_dummy_p(enc))
|
2007-09-26 09:39:08 +00:00
|
|
|
|
2007-12-25 10:01:06 +00:00
|
|
|
int rb_enc_casefold(char *to, const char *p, const char *e, rb_encoding *enc);
|
2007-08-25 04:14:26 +00:00
|
|
|
int rb_enc_toupper(int c, rb_encoding *enc);
|
|
|
|
int rb_enc_tolower(int c, rb_encoding *enc);
|
|
|
|
ID rb_intern3(const char*, long, rb_encoding*);
|
2007-12-25 10:01:06 +00:00
|
|
|
ID rb_interned_id_p(const char *, long, rb_encoding *);
|
2007-09-26 09:39:08 +00:00
|
|
|
int rb_enc_symname_p(const char*, rb_encoding*);
|
2007-09-26 19:46:58 +00:00
|
|
|
int rb_enc_str_coderange(VALUE);
|
2008-02-28 02:13:51 +00:00
|
|
|
long rb_str_coderange_scan_restartable(const char*, const char*, rb_encoding*, int*);
|
2007-11-25 13:25:34 +00:00
|
|
|
int rb_enc_str_asciionly_p(VALUE);
|
|
|
|
#define rb_enc_str_asciicompat_p(str) rb_enc_asciicompat(rb_enc_get(str))
|
2007-10-16 20:07:20 +00:00
|
|
|
VALUE rb_enc_from_encoding(rb_encoding *enc);
|
2007-12-22 23:47:18 +00:00
|
|
|
rb_encoding *rb_ascii8bit_encoding(void);
|
2007-12-21 06:59:48 +00:00
|
|
|
rb_encoding *rb_utf8_encoding(void);
|
2008-01-23 16:03:29 +00:00
|
|
|
rb_encoding *rb_usascii_encoding(void);
|
2007-12-28 10:12:13 +00:00
|
|
|
rb_encoding *rb_locale_encoding(void);
|
2008-06-16 21:28:03 +00:00
|
|
|
rb_encoding *rb_filesystem_encoding(void);
|
2007-12-01 14:05:53 +00:00
|
|
|
rb_encoding *rb_default_external_encoding(void);
|
2008-05-20 19:21:26 +00:00
|
|
|
int rb_ascii8bit_encindex(void);
|
2008-06-29 17:33:01 +00:00
|
|
|
int rb_utf8_encindex(void);
|
|
|
|
int rb_usascii_encindex(void);
|
2007-12-01 14:05:53 +00:00
|
|
|
VALUE rb_enc_default_external(void);
|
|
|
|
void rb_enc_set_default_external(VALUE encoding);
|
2007-12-21 02:52:23 +00:00
|
|
|
VALUE rb_locale_charmap(VALUE klass);
|
2008-03-17 19:04:29 +00:00
|
|
|
long rb_memsearch(const void*,long,const void*,long,rb_encoding*);
|
2007-08-25 04:14:26 +00:00
|
|
|
|
2008-05-19 08:25:03 +00:00
|
|
|
RUBY_EXTERN VALUE rb_cEncoding;
|
2008-07-04 11:44:05 +00:00
|
|
|
#define enc_initialized_p(enc) ((enc)->ruby_encoding_index != ENC_UNINITIALIZED)
|
|
|
|
#define ENC_DUMMY_FLAG (1<<24)
|
|
|
|
#define ENC_INDEX_MASK (~(~0U<<24))
|
2008-05-19 08:25:03 +00:00
|
|
|
|
2008-07-04 11:44:05 +00:00
|
|
|
#define ENC_TO_ENCINDEX(enc) ((enc)->ruby_encoding_index & ENC_INDEX_MASK)
|
|
|
|
#define ENC_FROM_ENCINDEX(idx) (RARRAY_PTR(rb_encoding_list)[idx])
|
|
|
|
#define ENC_FROM_ENCODING(enc) ENC_FROM_ENCINDEX(ENC_TO_ENCINDEX(enc))
|
2008-05-19 08:25:03 +00:00
|
|
|
|
2008-07-04 11:44:05 +00:00
|
|
|
#define ENC_DUMMY_P(enc) ((enc)->ruby_encoding_index & ENC_DUMMY_FLAG)
|
|
|
|
#define ENC_SET_DUMMY(enc) ((enc)->ruby_encoding_index |= ENC_DUMMY_FLAG)
|
2008-05-19 08:25:03 +00:00
|
|
|
|
|
|
|
static inline int
|
|
|
|
rb_enc_dummy_p(rb_encoding *enc)
|
|
|
|
{
|
2008-07-04 11:44:05 +00:00
|
|
|
return ENC_DUMMY_P(enc) != 0;
|
2008-05-19 08:25:03 +00:00
|
|
|
}
|
|
|
|
|
2008-05-20 16:37:13 +00:00
|
|
|
VALUE rb_str_transcode(VALUE str, VALUE to);
|
|
|
|
|
2008-08-14 14:28:10 +00:00
|
|
|
/* econv stuff */
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
econv_invalid_byte_sequence,
|
|
|
|
econv_undefined_conversion,
|
|
|
|
econv_destination_buffer_full,
|
|
|
|
econv_source_buffer_empty,
|
|
|
|
econv_finished,
|
|
|
|
econv_output_followed_by_input,
|
|
|
|
} rb_econv_result_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
struct rb_transcoding *tc;
|
|
|
|
unsigned char *out_buf_start;
|
|
|
|
unsigned char *out_data_start;
|
|
|
|
unsigned char *out_data_end;
|
|
|
|
unsigned char *out_buf_end;
|
|
|
|
rb_econv_result_t last_result;
|
|
|
|
} rb_econv_elem_t;
|
|
|
|
|
|
|
|
typedef struct {
|
2008-08-16 06:25:38 +00:00
|
|
|
const char *source_encoding_name;
|
|
|
|
const char *destination_encoding_name;
|
|
|
|
|
2008-08-16 05:32:42 +00:00
|
|
|
unsigned char *in_buf_start;
|
|
|
|
unsigned char *in_data_start;
|
|
|
|
unsigned char *in_data_end;
|
|
|
|
unsigned char *in_buf_end;
|
2008-08-14 14:28:10 +00:00
|
|
|
rb_econv_elem_t *elems;
|
|
|
|
int num_trans;
|
|
|
|
int num_finished;
|
2008-08-16 05:32:42 +00:00
|
|
|
int last_trans_index; /* last trans, not including universal newline */
|
2008-08-14 14:28:10 +00:00
|
|
|
struct rb_transcoding *last_tc;
|
|
|
|
|
2008-08-15 09:12:56 +00:00
|
|
|
/* last error */
|
|
|
|
struct {
|
|
|
|
rb_econv_result_t result;
|
2008-08-15 09:33:59 +00:00
|
|
|
struct rb_transcoding *error_tc;
|
2008-08-15 09:12:56 +00:00
|
|
|
const char *source_encoding;
|
|
|
|
const char *destination_encoding;
|
|
|
|
const unsigned char *error_bytes_start;
|
|
|
|
size_t error_bytes_len;
|
|
|
|
size_t readagain_len;
|
|
|
|
int partial_input;
|
|
|
|
} last_error;
|
|
|
|
|
2008-08-14 14:28:10 +00:00
|
|
|
/* The following fields are only for Encoding::Converter.
|
|
|
|
* rb_econv_open set them NULL. */
|
|
|
|
rb_encoding *source_encoding;
|
|
|
|
rb_encoding *destination_encoding;
|
|
|
|
} rb_econv_t;
|
|
|
|
|
2008-08-14 15:56:39 +00:00
|
|
|
rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, int flags);
|
2008-08-14 14:28:10 +00:00
|
|
|
rb_econv_result_t rb_econv_convert(rb_econv_t *ec,
|
2008-08-14 15:56:39 +00:00
|
|
|
const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end,
|
|
|
|
unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end,
|
2008-08-14 14:28:10 +00:00
|
|
|
int flags);
|
2008-08-17 04:25:56 +00:00
|
|
|
void rb_econv_close(rb_econv_t *ec);
|
2008-08-15 11:02:07 +00:00
|
|
|
|
2008-08-16 05:32:42 +00:00
|
|
|
/* result: 0:success -1:failure */
|
|
|
|
int rb_econv_insert_output(rb_econv_t *ec,
|
|
|
|
const unsigned char *str, size_t len, const char *str_encoding);
|
|
|
|
|
|
|
|
/* encoding that rb_econv_insert_output doesn't need conversion */
|
|
|
|
const char *rb_econv_encoding_to_insert_output(rb_econv_t *ec);
|
2008-08-15 11:02:07 +00:00
|
|
|
|
2008-08-16 15:04:39 +00:00
|
|
|
/* raise an error if the last rb_econv_convert is error */
|
|
|
|
void rb_econv_check_error(rb_econv_t *ec);
|
|
|
|
|
2008-08-17 04:25:56 +00:00
|
|
|
int rb_econv_putbackable(rb_econv_t *ec);
|
|
|
|
void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n);
|
2008-08-14 14:28:10 +00:00
|
|
|
|
2008-08-18 12:06:42 +00:00
|
|
|
/* returns corresponding stateless encoding, or NULL if not stateful. */
|
|
|
|
const char *rb_econv_stateless_encoding(const char *stateful_enc);
|
|
|
|
|
|
|
|
VALUE rb_econv_string(rb_econv_t *ec, VALUE src, long off, long len, VALUE dst, int flags);
|
|
|
|
|
2008-08-14 14:48:41 +00:00
|
|
|
/* flags for rb_econv_open */
|
|
|
|
#define ECONV_UNIVERSAL_NEWLINE_DECODER 0x100
|
|
|
|
#define ECONV_CRLF_NEWLINE_ENCODER 0x200
|
|
|
|
#define ECONV_CR_NEWLINE_ENCODER 0x400
|
|
|
|
|
|
|
|
/* flags for rb_econv_convert */
|
|
|
|
#define ECONV_PARTIAL_INPUT 0x10000
|
|
|
|
#define ECONV_OUTPUT_FOLLOWED_BY_INPUT 0x20000
|
|
|
|
|
2007-08-25 04:14:26 +00:00
|
|
|
#endif /* RUBY_ENCODING_H */
|