bugGNUstep - Bugs: bug #9403, GNUstep does not assume an...

Group
 
 

bug #9403: GNUstep does not assume an NSLanguage if one is not set in the defaults

Submitter:  Alex Perez <aperez>
Submitted:  Mon 21 Jun 2004 02:20:39 AM UTC
   
 
Category:  Base/Foundation Severity:  3 - Normal
Item Group:  Change Request Status:  None
Privacy:  Public Assigned to:  CaS
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 18 Jul 2004 10:51:40 AM UTC, comment #3: 

No feedback received after a month ... so I'm closing this bug.

Richard Frith-Macdonald <CaS>
Group Member
Mon 21 Jun 2004 01:35:24 PM UTC, comment #2: 

I have updated the NSCalendarDate code to understand '%r' when producng descriptions ... that should avoid problems when something sets the format for a date to contain a '%r'.

It does not address any problem with NSLanguages of course.  To look into that I need more information about what the exact issue is and how to reproduce it. I'm not sure that there is any requirement that NSLanguages should be set, and as far as I can see, the +userLanguages method should work reasonably whether NSLanguages is set or not.

Richard Frith-Macdonald <CaS>
Group Member
Mon 21 Jun 2004 07:58:24 AM UTC, comment #1: 

Please coud you clarify the nature of the bug.

Are you saying that the NSLanguages user default is not being set in some circumstances?  If so, are you able to provide instructions to reproduce this?

The '%r' you are seeing does not appear to be a 'legal' format.  If you look at the Cocoa documentation for 'descriptionWithCalendarFormat:'  it refers you to a short section on 'Setting the Format for Dates', which in turn refers you to 'Date Formatters', which is described as 'a complete description of the syntax of date format strings', ad this does not include '%r'

However, GNUstep has an extension to map '%r' to be '%I:%M:%S %p' at the point where a date is created... but this mapping is independant of the NSLanguages default.
I guess Cocoa might have a similar undocumented feature.  (or even documented in some other conflicting part of the docmentation).

However, there is a question of where the '%r' is coming from...
Since GNUstep maps it when a date is created, the only thing I cas think is that it's in a format set into a date using the setFormat: method.
Perhaps it comes from GMUmail ... in which case there would be a bug there, but I think it's at least as likely that GNUstep is picking it up from the locale information provided by the operating system.  If this is the case, then the bug is in mapping the O/S locale information to OpenStep/Cocoa locale information.

Richard Frith-Macdonald <CaS>
Group Member
Mon 21 Jun 2004 02:20:39 AM UTC, original submission:  

This problem, which has existed for at least one year and two months, was first addressed by Rene Berber and Robert Burns in  an e-mail correspondence on Discuss-GNUstep on April 28, 2003. Adam's e-mail reply, stating clearly that this is a bug, followed soon after and can be viewed at http://lists.gnu.org/archive/html/discuss-gnustep/2003-04/msg00441.html

Essentially, the problem I was experiencing was that timestamps in GNUMail were not displaying properly. Instead of the time, I see %r. After discussing this publically on the GNUstep IRC channel, Ludovic and Rob Burns told me what the "solution" was, which was to set NSLanguages to anything (in my case English). The bug is that English (or /something/) should be assumed if NSLanguages is not set. This affects every single person who uses GNUMail, since the probability is extremely high that they have not set their NSLanguages default.

Alex Perez <aperez>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

Only logged-in users can vote.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-07-18 CaS Open/ClosedOpen Closed
2004-06-21 aperez Assigned toNone CaS

Back to the top

Powered by Savane 3.13-758e.
Corresponding source code