Serialized date contains wrong encoding chars

RESOLVED INACTIVE

Status

()

Core
RDF
RESOLVED INACTIVE
14 years ago
2 days ago

People

(Reporter: O. Atsushi (Torisugari), Unassigned)

Tracking

Trunk
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
When I serialize a datasource which has nsIRDFDate, 
output string contains "東京(標準時)", 
due to ::strftime() on MS Windows.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_crt_strftime.2c_.wcsftime.asp
>Either the time-zone name or time zone abbreviation,
>depending on registry settings

The problem is this string is encoded in Shift_JIS,
while rdf serializer assumes it should be a pure ascii string..
Then serialized rdf file has mixed encodings: UTF-8 and Shift_JIS. 

In my opinion, there's no need to append the time zone name.

http://lxr.mozilla.org/mozilla/source/rdf/base/src/rdfutil.cpp#174
> 174     // Outputs Unixish date in GMT plus usecs; e.g.,
> 175     //   Wed Jan  9 19:15:13 GMT 2002 +002441

According to the comment, we should use "GMT" instead of "%z".

W3C's "Date and Time Formats"(ISO 8601) is another way to go.
http://www.w3.org/TR/rdf-syntax-grammar/#section-Serialising
http://www.w3.org/TR/NOTE-datetime
http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#dateTime
http://www.cl.cam.ac.uk/~mgk25/iso-time.html

e.g. "2004-12-14T18:37:20.000000+09:00"

Comment 1

14 years ago
One of the things on my list, though pretty way down on it. Dates are just too
char consuming, RDFXML isn't meant to be read by humans, so there is no point in
putting in more info than required to parse the date.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

12 years ago
Depends on: 302387

Comment 2

2 days ago
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Last Resolved: 2 days ago
Resolution: --- → INACTIVE
You need to log in before you can comment on or make changes to this bug.