Closed Bug 333408 Opened 18 years ago Closed 13 years ago

native uconv: character encoding name issues

Categories

(Core :: Internationalization, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jshin1987, Unassigned)

References

Details

(Keywords: intl)

There are a couple of issues with character encoding names in the current implementation of native uconv. 

Firstly, no name mapping is done to bridge the differences in naming between native character encoding names (as understood by iconv) and our canonical names. See, for instnace, 

http://lxr.mozilla.org/seamonkey/source/intl/uconv/src/nsCharsetConverterManager.cpp#194

191 #ifdef MOZ_USE_NATIVE_UCONV
192   if (mNativeUC) {
193     nsCOMPtr<nsISupports> supports;
194     mNativeUC->GetNativeConverter("UCS-2", 
195                                   aDest,
196                                   getter_AddRefs(supports));

This doesn't work in some cases although GNU iconv does recognize many different names. It's far far worse with other implementations of iconv (as found on Solaris, AIX, Tru64, etc). 

Secondly, what PRUnichar* contains(points to) is NOT UCS-2 BUT UTF-16 (in the native endian) !! However, just using 'UTF-16' in place of 'UCS-2' when calling |GetNativeConverter| (which is just a wrapper over iconv_open) doesn't work on many platforms, either. See what we have done in xpcom/io/nsNativeCharsetUtils.cpp to work around this problem.
mass reassigning to nobody.
Assignee: dougt → nobody
QA Contact: amyy → i18n
Depends on: 644801
Native uconv is gone.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.