projects
/
m17n
/
m17n-lib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2f5663a
)
(mconv_decode, mconv_gets): Adjust the format of MT to
author
handa
<handa>
Mon, 21 Jun 2004 00:16:10 +0000
(
00:16
+0000)
committer
handa
<handa>
Mon, 21 Jun 2004 00:16:10 +0000
(
00:16
+0000)
utf-8.
src/coding.c
patch
|
blob
|
history
diff --git
a/src/coding.c
b/src/coding.c
index
533970e
..
47db291
100644
(file)
--- a/
src/coding.c
+++ b/
src/coding.c
@@
-4404,6
+4404,9
@@
mconv_decode (MConverter *converter, MText *mt)
M_CHECK_READONLY (mt, NULL);
+ if (mt->format != MTEXT_FORMAT_UTF_8)
+ mtext__adjust_format (mt, MTEXT_FORMAT_UTF_8);
+
if (! mt->data)
mtext__enlarge (mt, MAX_UTF8_CHAR_BYTES);
@@
-5037,6
+5040,9
@@
mconv_gets (MConverter *converter, MText *mt)
int c;
M_CHECK_READONLY (mt, NULL);
+ if (mt->format != MTEXT_FORMAT_UTF_8)
+ mtext__adjust_format (mt, MTEXT_FORMAT_UTF_8);
+
while (1)
{
c = mconv_getc (converter);