Permalink
Browse files

fixed a bug in the dynlib with some escaped utf-8 characters

  • Loading branch information...
1 parent ac8feb1 commit 5a8ba779c9b955a5de6add1a04e03b7a89b304a5 @mattetti committed Feb 26, 2009
Showing with 3 additions and 2 deletions.
  1. BIN lib/BSJSON.bundle
  2. +1 −1 src/BSJSON/NSScanner+BSJSONAdditions.m
  3. +2 −1 tests/runner.rb
View
Binary file not shown.
@@ -157,7 +157,7 @@ - (BOOL)scanJSONString:(NSMutableString **)string
/* START Updated code modified from code fix submitted by Bill Garrison - March 28, 2006 - http://www.standardorbit.net */
NSScanner *hexScanner = [NSScanner scannerWithString:digits];
NSMutableString *verifiedHexDigits;
- NSCharacterSet *hexDigitSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEF"];
+ NSCharacterSet *hexDigitSet = [NSCharacterSet characterSetWithCharactersInString:@"0123456789ABCDEFabcdef"];
if (NO == [hexScanner scanCharactersFromSet:hexDigitSet intoString:&verifiedHexDigits])
return NO;
if (4 != [verifiedHexDigits length])
View
@@ -5,4 +5,5 @@
# p JSON.load(['a', 'b', 'c'].to_json)
# p JSON.generate [1, 2, {"a"=>3.141}, false, true, nil, 4..10] == "[1,2,{\"a\":3.141},false,true,null,\"4..10\"]"
-require File.join(File.dirname(__FILE__), "test_json")
+require File.join(File.dirname(__FILE__), "test_json")
+# p JSON.load "{\"_id\":\"compound-synthesis-123562176428057\",\"_rev\":\"3225026046\",\"name\":\"Compound Synthesis\",\"sub_categories\":[\"compound-2-123562185648062\"],\"couchrest-type\":\"Category\",\"_revs_info\":[{\"rev\":\"3225026046\",\"status\":\"available\"},{\"rev\":\"4197510875\",\"status\":\"available\"},{\"rev\":\"1533305651\",\"status\":\"available\"}]}\n"

0 comments on commit 5a8ba77

Please sign in to comment.