bug-gnupod
[Top][All Lists]
Advanced

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

Re: [Bug-gnupod] Encoding of non-ascii characters in GNUtunesDB.xml


From: H. Langos
Subject: Re: [Bug-gnupod] Encoding of non-ascii characters in GNUtunesDB.xml
Date: Mon, 14 Apr 2008 20:12:30 +0200
User-agent: Mutt/1.5.13 (2006-08-11)

Ok, here's the patch ...

Took longer than I thought because UTF8 in perl is a major pain.

cheers
-henrik

PS: The line "$xutf =~ tr/\000-\037//d;" is not without problems. It
will reduce all control characters to nothing including TAB, LF, 
and CR eventhough they are valid XML characters. 

Could somebody check out how iTunes handles those? Does it also remove 
those characters or does it convert them into 	 and so on?


On Mon, Apr 14, 2008 at 02:14:18PM +0200, H. Langos wrote:
> Hi there,
> 
> I wonder If anybody else has the ocassional problem with editing her/his
> GNUtunesDB.xml. 
> 
> Since it is XML and the encoding is UTF-8 you don't have any problem as
> long as your system is completely UTF-8 compliant. I however have a
> mixed iso-8859-1 iso-8859-15 and UTF-8 mess and some of the editors 
> that I like to use are not very smart about handling the character 
> encoding.
> 
> It would be very easy to convert everything outsite the ascii range to 
> the XML escaped version. So say, instead of some garbage you'd see 
> "ś" where a "Latin Small Letter s with Acute" is.
> 
> Pro: GNUtunesDB.xml becomes a pure ascii file. No more editor/viewer 
>   issues.
> 
> Contra: The GNUtunesDB.xml becomes slightly bigger and for people with a
>   clean UTF-8 toolchain it becomes a little less readable. (Note: You can
>   still edit the file and insert native UTF-8 as you please.)
> 
> Any thoughts?
> 
> cheers
> -henrik
> 
> 
> 
> _______________________________________________
> Bug-gnupod mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/bug-gnupod

Attachment: feat_5ce6a9e9_pure-ascii-encoded-GNUtunesDB.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]