You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-cvs@tcl.apache.org by ro...@apache.org on 2005/09/09 14:33:59 UTC
cvs commit: tcl-websh/src/generic htmlify.c
ronnie 2005/09/09 05:33:59
Modified: src/generic htmlify.c
Log:
- also encode multibyte characters in web::htmlify (thanks to Taguchi Takeshi)
Revision Changes Path
1.5 +9 -6 tcl-websh/src/generic/htmlify.c
Index: htmlify.c
===================================================================
RCS file: /home/cvs/tcl-websh/src/generic/htmlify.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- htmlify.c 11 Sep 2002 13:54:01 -0000 1.4
+++ htmlify.c 9 Sep 2005 12:33:59 -0000 1.5
@@ -71,13 +71,11 @@
if (unic == 0)
break;
- if (unic > WEBENC_LATIN_TABLE_LENGTH)
- continue;
-
/* --------------------------------------------------------------------
* translation needed ?
* ----------------------------------------------------------------- */
- if (convData->need[unic] == TCL_OK) {
+ if (unic <= WEBENC_LATIN_TABLE_LENGTH &&
+ convData->need[unic] == TCL_OK) {
/* yes */
@@ -104,9 +102,14 @@
}
}
else {
-
+ if (unic > WEBENC_LATIN_TABLE_LENGTH) {
+ /* numeric translation, because there is no entity
+ for characters > 256 (multibyte character sets */
+ htmlifyAppendNum(res, unic);
+ } else {
/* no, no translation needed */
Tcl_AppendUnicodeToObj(res, &unic, 1);
+ }
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: websh-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-cvs-help@tcl.apache.org