On 12/2/07, Daniel DeLorme <dan-ml / dan42.com> wrote: > I know it's kinda late to make any changes to the 1.9 roadmap, so I'm > not hoping to change anything, but there's this *tiny* thing I'm worried > about with m17n: depending on the string's encoding, methods like > String#index will return either byte position or character positions. > Since a Fixnum cannot carry information about where it came from, isn't > there the risk of opening a whole new *class* of bugs where a > character-position integer is fed to a byte-encoded string method and > vice-versa? Has this been encountered or has there been too little > experience with m17n strings or am I just too paranoid? No. #index always returns character position; it just so happens that some encodings use bytes for their character position. > Disclaimer: ultimately I am a curmudgeon who believes m17n strings are a > (too-)ambitious technical solution to a social problem ;-P I think that m17n is a better solution than Unicode all the time given the amount of legacy data out there, despite the definite value of Unicode as a long-term solution. -austin -- Austin Ziegler * halostatue / gmail.com * http://www.halostatue.ca/ * austin / halostatue.ca * http://www.halostatue.ca/feed/ * austin / zieglers.ca