Closed Bug 276360 Opened 20 years ago Closed 20 years ago

Don't use non-ASCII wide character constants

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: smontagu, Assigned: smontagu)

References

()

Details

(Keywords: intl)

Attachments

(1 file)

Wide-character constants outside the ASCII range (e.g. L'\x00c0') are
non-portable and shouldn't be used: their value is dependent on the effective
locale at compilation time. On my locale (Hebrew) nsXFormsXPathXMLUtil.cpp won't
even compile, because L'\x00ff' is an undefined character.

See 'man mbrtowc'.
Attached patch PatchSplinter Review
The diff is hard to read, but it's just the result of a regexp-replace of
L'\\x\(....\)'
by
0x\1
Attachment #169833 - Flags: superreview?(darin)
Attachment #169833 - Flags: review?(aaronr)
Comment on attachment 169833 [details] [diff] [review]
Patch

yeah, anyways the "L" prefix is not very portable.  thanks for creating this
patch simon!

sr=darin
Attachment #169833 - Flags: superreview?(darin) → superreview+
These arrays aren't necessary anyway, there are two functions (IsXMLLetter and
IsXMLNCNameChar) on nsIParserService that can be used instead.
(In reply to comment #3)
> These arrays aren't necessary anyway, there are two functions (IsXMLLetter and
> IsXMLNCNameChar) on nsIParserService that can be used instead.

Check. All the nsXFormsXPath*-files should be integrated with Transformiix and
other existing code, it was just to make things work. Bug 265212 will track that
work.
Comment on attachment 169833 [details] [diff] [review]
Patch

Thanks for the patch.
r=aaronr
Attachment #169833 - Flags: review?(aaronr) → review+
THanks for reviews, patch checked in.
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: