12/05/17 13:34:50.07 YE5Ahd9B0
if (*buf >= 0x20 && *buf <= 0x7e) {
// ASCII文字
pickup = [async_data subdataWithRange:NSMakeRange(i, 1)];
str999 = [[NSString alloc] initWithData:pickup encoding:NSShiftJISStringEncoding];
if (str999 == nil) {
NSLog(@"convert error %x ASCII", *buf);
str999 = @"?";
}
[str2 appendString:str999];
buf++;
continue;
}
if (*buf >= 0xA1 && *buf <= 0xDF) {
// 半角カタカナ
pickup = [async_data subdataWithRange:NSMakeRange(i, 1)];
str999 = [[NSString alloc] initWithData:pickup encoding:NSShiftJISStringEncoding];
if (str999 == nil) {
NSLog(@"convert error %x KANA", *buf);
str999 = @"?";
}
[str2 appendString:str999];
buf++;
continue;
}