php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #54674
Patch mysqlnd_charset_fix_sjis.patch revision 2011-05-06 09:54 UTC by nihen at megabbs dot com

Patch mysqlnd_charset_fix_sjis.patch for PDO related Bug #54674

Patch version 2011-05-06 09:54 UTC

Return to Bug #54674 | Download this patch
Patch Revisions:

Developer: nihen@megabbs.com

--- ext/mysqlnd/mysqlnd_charset.c	2011-05-06 18:28:04.339993471 +0900
+++ ext/mysqlnd/mysqlnd_charset.c.org	2011-05-06 18:00:19.619987978 +0900
@@ -326,10 +326,10 @@
 
 
 /* {{{ sjis functions */
-#define valid_sjis_head(c)	((0x81 <= (c) && (c) <= 0x9F) || \
+#define valid_sjis_head(c)	((0x81 <= (c) && (c) <= 0x9F) && \
 							 (0xE0 <= (c) && (c) <= 0xFC))
-#define valid_sjis_tail(c)	((0x40 <= (c) && (c) <= 0x7E) || \
-							 (0x80 <= (c) && (c) <= 0xFC))
+#define valid_sjis_tail(c)	((0x40 <= (c) && (c) <= 0x7E) && \
+							 (0x80 <= (c) && (c) <= 0x7C))
 
 
 static unsigned int check_mb_sjis(const char *start, const char *end)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 30 21:01:30 2024 UTC