discuss-gnustep
[Top][All Lists]
Advanced

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

Re: plists in UTF8


From: Richard Frith-Macdonald
Subject: Re: plists in UTF8
Date: Wed, 14 Jun 2006 12:12:00 +0100


On 14 Jun 2006, at 11:43, David Wetzel wrote:

Hi folks,

plparse does not work with plists that contain UTF8 Cyrillic chars.

Property List Editor.app on Mac OS X does.

File says: ru.plist: UTF-8 Unicode C program text

May we change this behaviour?

Well is it a bug? ... plparse is intended to provide a check that a file contains a valid property list ... but it could easily be the case that 'Property List Editor.app' will edit invalid property lists (fault tolerance makes sense in an editor b ut not in a checker) ... so what you probably need to determine is if there is a bug in plparse.

A valid property list may ...

1. Be ASCII data (with \U escapes for unicode)
2. Be UTF-16 with a leading BOM to identify it
3. Be UTF-8 with a leading BOM to identify it

I guess in theory an XML property list could also specify its character encoding in the header but we don't have support for that.

Anything else is invalid ... because it's non-portable and the meaning of the data in the file would change if you opened the file using another locale.

I guess if you want plparse to accept non-portable files (ie guess that the encoding is that of the current locale), you could provide a patch to add a command-line option to get it to do that.
eg. plparse -PermitNonPortable YES filename

I don't think that would cause problems for anyone.





reply via email to

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