instance method
get_order
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
get_order(aStr)
No documentation comment.
Parameters
-
aStrreq
Source
# File actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb, line 172
def get_order(aStr)
# for big5 encoding, we are interested
# first byte range: 0xa4 -- 0xfe
# second byte range: 0x40 -- 0x7e , 0xa1 -- 0xfe
# no validation needed here. State machine has done that
if aStr[0..0] >= "\xA4"
if aStr[1..1] >= "\xA1"
return 157 * (aStr[0] - 0xA4) + aStr[1] - 0xA1 + 63
else
return 157 * (aStr[0] - 0xA4) + aStr[1] - 0x40
end
else
return -1
end
end
Defined in actionmailer/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb line 172
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in CharDet::Big5DistributionAnalysis