Re: latin-1 encoding

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

 



On Mon, Apr 20, 2009 at 04:53:12PM +0200, Eugen Dedu wrote:
> Alan Stern wrote:
> > On Mon, 20 Apr 2009, Eugen Dedu wrote:
> > 
> >> Hi,
> >>
> >> (This e-mail is because we have a bug about a camera name which seems 
> >> not to be in utf-8, 
> >> https://bugs.launchpad.net/ubuntu/+source/ekiga/+bug/345192?comments=all)
> >>
> >> I was told 
> >> (http://www.mail-archive.com/linux-uvc-devel@xxxxxxxxxxxxxxxx/msg04022.html) 
> >> that camera names (and possibly others, such as device names) are 
> >> recorded as utf-16 in cameras, and linux usb subsystem transforms them 
> >> to latin-1 (iso-8859-1) before making them available to applications.
> >>
> >> This is an inconvenient for applications which should print them (to 
> >> terminal or to windows), as nowadays utf-8 is ubiquitous.
> >>
> >> So my question is: why does usb linux use latin-1 and not utf-8?
> > 
> > Because the code was written that way originally and nobody has ever 
> > changed it.  This may sound facetious, but it is the simple truth.
> 
> Thanks for the fast reply!
> 
> I see now the corresponding function, at 
> http://lxr.linux.no/linux+v2.6.29/drivers/usb/core/message.c#L761.  I 
> looked at several places where it is used, and until now it seems that 
> changing it to utf-8 has no negative impacts on the other code.  Do you 
> think that it is feasible (easy) to really make this change?

I don't think it would be that difficult, but watch out for the
different encoding conversions that might be needed.  Care to send a
patch doing this?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux