Closed Bug 38887 Opened 25 years ago Closed 20 years ago

[regression] Bookmarks don't correctly import CJK bookmarks from the IE Favorties List

Categories

(Core :: Internationalization, defect, P3)

x86
Windows NT
defect

Tracking

()

RESOLVED WORKSFORME
Future

People

(Reporter: m_kato, Assigned: waterson)

References

Details

(Keywords: helpwanted, Whiteboard: [nsbeta2+])

Attachments

(2 files)

ENVIRONMENT =========== Windows NT 4.0 SP6 JPN Mozilla 20000509 DESCRIPTON ========== See bug 6770. This regression is from moziial/rdf/nsFileSystemDataSource.cpp version 1.71.
Blocks: 35012
This real problem is mozilla/rdf/base/src/nsRDFService.cpp. We should fix the following method. NS_IMETHODIMP RDFServiceImpl::GetUnicodeResource(const PRUnichar* aURI, nsIRDFResource** aResource)
reassign to waterson. mark this nsbeta2. This is an regression of an nsbeta1+ bug.
Assignee: ftang → waterson
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: nsbeta2
rjc: is this because we use the "new" filesystem datasource? If so, it's probably the same basic problem as bug 28787...
CCing frank. This problem is the following... http://lxr.mozilla.org/seamonkey/source/rdf/base/src/nsRDFService.cpp#692 692 RDFServiceImpl::GetUnicodeResource(const PRUnichar* aURI, nsIRDFResource** aResource) 693 { 694 NS_PRECONDITION(aURI != nsnull, "null ptr"); 695 if (! aURI) 696 return NS_ERROR_NULL_POINTER; 697 698 char buf[128]; 699 char* uri = buf; 700 701 PRUint32 len = nsCRT::strlen(aURI); 702 if (len >= sizeof(buf)) { 703 uri = (char *)nsAllocator::Alloc(len + 1); 704 if (! uri) return NS_ERROR_OUT_OF_MEMORY; 705 } 706 707 /* CopyChars2To1(uri, 0, aURI, 0, len); // XXX not exported */ 708 const PRUnichar* src = aURI; 709 char* dst = uri; 710 while (*src) { 711 *dst = (*src < 256) ? char(*src) : '.'; 712 ++src; 713 ++dst; 714 } 715 *dst = '\0'; 716 717 nsresult rv = GetResource(uri, aResource); 718 719 if (uri != buf) 720 nsCRT::free(uri); 721 722 return rv; 723 } Until nsFileSystemDataSource.cpp v1.70, it uses GetResource(), not GetUnicodeResource(). So this problem doesn't occur.
...the suggestion being that this should expand using UTF-8 rather than naive widening? If so, ftang: is there a routine that's exported somewhere that I could use?
If it converts to UTF-8 in RDFServiceImpl::GetUnicodeResource(), network code must rewrite, too... Easy fix converts to filesystem charset.
Attached patch easy fixSplinter Review
The changes to nsXULElement.cpp look fine to me. If you've tested them (and have checkin rights), check it in. Let me know if you need me to check that in. I'll let RJC comment on the nsFileSystemDataSource.cpp changes: I'm not familiar with that code.
The rjc's codes looks good as unicode normalization. Probebry, he re-wrote since nsFileSpec is obsolete. But GetUnicodeResource() isn't i18n safe. When I fixed bug 6770 and bug 29543, I noticed that GetUnicodeResource() occurs bad cast. And, for performance, this should use filesystem charset (not Unicode). I changed nsXULElement.cpp, too. This is for performance and code clean-up.
Whiteboard: [nsbeta2+]
marking nsbeta2+ as per PDT meeting
If the changes work, check 'em in. :)
Status: NEW → ASSIGNED
Target Milestone: --- → M17
These appear to work fine on US WinNT.
*** Bug 6770 has been marked as a duplicate of this bug. ***
*** Bug 6770 has been marked as a duplicate of this bug. ***
I applied the patch and tested on Japanese localized WinNT4. I can see Japanese in imported IE links (tested with both new profile and existing profile).
fix checked in. thanks, m_kato!
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
I tested this in 2000-06-07-09 Win32 build. I created Japanese, Chinese, and Korean IE Favorite in IE 5.0. Then, I looked at Netscape's bookmark | IE Favorites. Netscape bookmark does not import Korean IE favorite. I can see Chinese and Japanese bookmark correctly. I reopen this.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
teruko-san, what is your test environment?
I am using Winnt4.0J with CK fonts and IE 5.00.2919.6307 version US. After I create CJK favorite by IE, I looked at the directory d:\Program files\Winnt40j\Profiles\teruko\Favorites I can see the Chinese, Korean, and Japanese Internet Shortcut whatever I created by IE. However, when I tried to open the Korean shortcut from Explorer, the error "This Internet Shortcut cannot be opened because failed to run" shows up. I can run Chinese and Japanese shortcut without any problems.
This isn't a bug. Mozilla's xpcom/io isn't Unicode normalization, and, don't use Unicode API (ex. CreateFileW etc). So, on JPN Windows, it uses JPN IE Fav only. If this fixes, it creates xpcom/io for NT like IE using Unicode API only.
Status: REOPENED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → LATER
Verified as Later.
Status: RESOLVED → VERIFIED
doesn't seem scandinavian national characters imports either - bug 51723. Dup?
LATER is deprecated per bug 35839.
Status: VERIFIED → REOPENED
Resolution: LATER → ---
Target Milestone: M17 → ---
This seems to be fixed, although I don't quite understand the status. Reopen if I've resolved in error.
Status: REOPENED → RESOLVED
Closed: 24 years ago23 years ago
Resolution: --- → FIXED
Kasumi, could you verify this?
QA Contact: teruko → kasumi
tested on 2002-06-26-08-1.0 Windows XP Pro. JA Personaly added URL displays and links properly. But redirection of default URLs are incorrect. Please refer attachment.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attached file URL comparison
Status: REOPENED → ASSIGNED
Keywords: helpwanted
Target Milestone: --- → Future
This is not reproduced with 2004120814/WinXP. -> WFM
Status: ASSIGNED → RESOLVED
Closed: 23 years ago20 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: