Re: [Rhythmbox-devel] UTF-8 issues still present



> > 
> > Yeah, I realized this much.  Just used to applications being smart
> > enough to detect "bad" utf8 characters and convert them from latin1, or
> > "good" utf8 characters and not doing anything with them.
> 
> 
> sorry, but imho there is not "bad" latin1 character ... latin1 means
> iso-8859-1, and it defined 256 characters... so basically every byte
> array is a valid latin1 encoded string => it's impossible to correctly
> detect if it's NOT latin1 for 100%. there can be some heuristics, but
> that's all.
> 

Things are generally done the other way round, and I think that's what
Chris meant: check if the input string is valid UTF-8, if it's not,
assume it's ISO8859-1 (or encoded in the user locale, or whatever).

Christophe

> bye,
> gabor
> 
> _______________________________________________
> rhythmbox-devel mailing list
> rhythmbox-devel@gnome.org
> http://mail.gnome.org/mailman/listinfo/rhythmbox-devel
> 
> 

Ceci est une partie de message=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]