diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2014-05-20 02:01:38 -0700 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2014-05-20 02:01:58 -0700 |
commit | 393a84a16da1723e828bb4e9d82c6369ba98d0b1 (patch) | |
tree | c7c814c31a11f656c48f3462c85bad33abe48967 | |
parent | f14bba6943800576a00433dae4458f472b9aae7e (diff) |
Fix regular expression subjects encoded in UTF-8.
-rw-r--r-- | Cydia/MIMEAddress.mm | 2 | ||||
-rw-r--r-- | MobileCydia.mm | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Cydia/MIMEAddress.mm b/Cydia/MIMEAddress.mm index e4dcbab..65f29ec 100644 --- a/Cydia/MIMEAddress.mm +++ b/Cydia/MIMEAddress.mm @@ -61,7 +61,7 @@ - (id) initWithString:(NSString *)string { if ((self = [super init]) != nil) { const char *data = [string UTF8String]; - size_t size = [string length]; + size_t size = [string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; static Pcre address_r("^\"?(.*)\"? <([^>]*)>$"); diff --git a/MobileCydia.mm b/MobileCydia.mm index 97ff1d4..8e4c796 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -834,7 +834,7 @@ NSString *LocalizeSection(NSString *section) { NSString *Simplify(NSString *title) { const char *data = [title UTF8String]; - size_t size = [title length]; + size_t size = [title lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; static Pcre square_r("^\\[(.*)\\]$"); if (square_r(data, size)) |