If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

need to update the string guide for new string APIs (1.8 and later)

RESOLVED FIXED

Status

Developer Documentation
General
RESOLVED FIXED
13 years ago
5 years ago

People

(Reporter: Jungshik Shin, Assigned: sheppy)

Tracking

Details

(URL)

(Reporter)

Description

13 years ago
To prevent old (and inefficient) APIs from being used (see bug 255931 comment #6
[1]), we need to update the string guide to document new APIs like
AppendLiteral, AppendASCII, and other 'ASCII'-optiomization APIs. I read cbie's
announcement  on a couple of newsgroups, but the words may not have spread
widely, yet.

Well, obviously, even with the up-to-date string guide, we can't guarantee that
old APIs won't be used any more. For instance, AppendASCIItoUTF16(a, b) has been
documented for a while, but still people keep using 'b +=
NS_ConvertASCIItoUTF16(a)'. 


[1] That would have been kept in check if somebody else had taken a look at the
patch. Hope there are not that many cases like that.
(In reply to comment #0)
> To prevent old (and inefficient) APIs from being used (see bug 255931 comment #6
> [1]), we need to update the string guide to document new APIs like
> AppendLiteral, AppendASCII, and other 'ASCII'-optiomization APIs.

I was aware of AppendLiteral/etc. for bug 255931; the problem here is that
AppendLiteral/AppendASCII aren't available on the aviary branch, where the
development for 255931 was occuring.  Changing it just for trunk makes merging
future patches painful.  Once we merge aviary back in to trunk, it won't be too
difficult to fix up the instances of the inefficient macros.


> Well, obviously, even with the up-to-date string guide, we can't guarantee that
> old APIs won't be used any more. For instance, AppendASCIItoUTF16(a, b) has been
> documented for a while, but still people keep using 'b +=
> NS_ConvertASCIItoUTF16(a)'. 

This I wasn't aware of, so would gladly welcome an updated string guide :)
(Reporter)

Comment 2

13 years ago
(In reply to comment #1)

> > old APIs won't be used any more. For instance, AppendASCIItoUTF16(a, b) has been
> > documented for a while, but still people keep using 'b +=
> > NS_ConvertASCIItoUTF16(a)'. 
> 
> This I wasn't aware of, so would gladly welcome an updated string guide :)

AppendASCIItoUTF16 has been available for over a year and the string guide has
documented it for almost as long. That is why I wrote you could have used it for
the branch in bug 255931 comment #6.

(In reply to comment #2)
> (In reply to comment #1)
> > This I wasn't aware of, so would gladly welcome an updated string guide :)
> 
> AppendASCIItoUTF16 has been available for over a year and the string guide has
> documented it for almost as long. That is why I wrote you could have used it for
> the branch in bug 255931 comment #6.

Hmm.. perhaps we're not looking at the same string guide;
http://www.mozilla.org/projects/xpcom/string-guide.html makes no mention of it,
or I'm just not seeing it.
(Reporter)

Comment 4

13 years ago
(In reply to comment #3)

> Hmm.. perhaps we're not looking at the same string guide;
> http://www.mozilla.org/projects/xpcom/string-guide.html makes no mention of it,

  Sorry I was wrong. I thought that AppendASCIItoUTF16 as well as
CopyASCIItoUTF16 was mentioned there. You're right that Append*'s are not
documented there. 

Comment 5

11 years ago
The guide was migrated to MDC, so please update it as you see fit:

http://developer.mozilla.org/en/docs/XPCOM_string_guide
Assignee: endico → nobody
Component: Mozilla Developer → Documentation Requests
Product: Documentation → Mozilla Developer Center
QA Contact: imajes → doc-request
Component: Documentation Requests → Documentation
Product: Mozilla Developer Network → Mozilla Developer Network
Automatically closing all bugs that have not been updated in a while. Please reopen if this is still important to you and has not yet been corrected.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
Reopening for review by Sheppy.
Assignee: nobody → eshepherd
Status: RESOLVED → REOPENED
Resolution: INVALID → ---
(Assignee)

Comment 8

5 years ago
I believe bsmedberg updated this ages ago, so I'm closing it. If anyone knows of specific issues, please file bugs on those.
Status: REOPENED → RESOLVED
Last Resolved: 5 years ago5 years ago
Resolution: --- → FIXED
Component: Documentation → General
Product: Mozilla Developer Network → Developer Documentation
You need to log in before you can comment on or make changes to this bug.