Bad import bookmarks from Opera (non-ASCII characters garbled)

RESOLVED FIXED

Status

()

Firefox
Migration
RESOLVED FIXED
14 years ago
14 years ago

People

(Reporter: JasnaPaka, Assigned: Jungshik Shin)

Tracking

({fixed-aviary1.0, intl})

1.0 Branch
x86
All
fixed-aviary1.0, intl
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(5 attachments)

17.71 KB, image/png
Details
31.87 KB, image/png
Details
20.59 KB, text/plain
Details
5.26 KB, application/zip
Details
1.00 KB, patch
Jungshik Shin
: review+
Ben Goodger (use ben at mozilla dot org for email)
: superreview+
Ben Goodger (use ben at mozilla dot org for email)
: approval-aviary+
Details | Diff | Splinter Review
(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+

I use File -> Import and import bookmarks and settings from Opera browser
(version 7.51). Problem is that national characters looks bad.

Opera 7.51: Look at "opera-bookmark.png"
Firefox 0.9 RC: Look at "firefox-bookmark.png"

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
(Reporter)

Comment 1

14 years ago
Created attachment 150556 [details]
opera-bookmark
(Reporter)

Comment 2

14 years ago
Created attachment 150557 [details]
firefox-bookmark
(Reporter)

Updated

14 years ago
Attachment #150557 - Attachment mime type: image/jpeg → image/png

Comment 3

14 years ago
I can confirm this with 0.9 on windows XP importing from Opera 7.5
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 4

14 years ago
Example URL: http://www.idnes.cz/ (v. screenshots).

Updated

14 years ago
Keywords: intl

Comment 5

14 years ago
I don't know if this is the same bug or I should open another one. When I
imported bookmarks from Mozilla all my bookmarks with apostrophs were imported
incorrectly. For example "JLP's" was imported as "JLP's". This is with
Firefox 0.9.1 on Windows XP.
(Reporter)

Comment 6

14 years ago
No, this isn't the same bug. 

Comment 7

14 years ago
Same thing happens with Finnish characters ( ö,ä,Ö,Ä ). Bookmarks (or bookmark
folders) containing these characters are not properly imported from Opera. This
bug exists also in the Linux version of Firefox. All local characters ( ö,ä,Ö,Ä
) are shown as ~Ä (tilde followed by capital A with two dots over it).

Probably the same thing happens with Swedish ( å,Å ) characters, but I can not
confirm it.
(Assignee)

Comment 8

14 years ago
Can anyone upload an opera bookmarks file? I need to know how they store
non-ASCII characters in bookmarks file. 

Taking.
Assignee: bugs → jshin
Summary: Bad import bookmarks from Opera (national characters looks bad) → Bad import bookmarks from Opera (non-ASCII characters garbled)
Created attachment 156964 [details]
Opera bookmarks file

Here's an Opera bookmarks file with one Hebrew site and one Japanese. The
encoding of this file is UTF-8, but note that starts like this:

Opera Hotlist version 2.0
Options: encoding = utf8, version=3

Possibly the file could be in other encodings and we need to parse the
"Options" line?
(Assignee)

Comment 10

14 years ago
(In reply to comment #9)
Thanks. Somehow 'File | Import' doesn't work for me in Firefox when I choose an
opera bookmarks file. I ended up removing ~/.mozilla/firefox to make it believe
this is the first-run so that it prompts me to answer from which program to
import  bookmarks/preferences. 

> Options: encoding = utf8, version=3
> 
> Possibly the file could be in other encodings and we need to parse the
> "Options" line?

Maybe, that's the case. I didn't have any trouble importing (when I ran firefox
for the first time) opera bookmarks file in UTF-8. 

Pavel, can you take a look at what 'Options' line of your Opera bookmarks file
is like? You can upload it here if you want. 

(Reporter)

Comment 11

14 years ago
Created attachment 157176 [details]
Opera bookmark
(Reporter)

Comment 12

14 years ago
(In reply to comment #10)
> Pavel, can you take a look at what 'Options' line of your Opera bookmarks file
> is like? You can upload it here if you want. 

I upload example of Opera bookmars. With this file i have the same problem.

'Options' line
---------------
Options: encoding = utf8, version=3

Comment 13

14 years ago
I just tried to import my Opera 7.54 bookmarks into Firefox 0.9.3, and the
import process stopped abruptly when it reached the folder that I will paste
below from Opera's bookmarks file.  When I went back into Opera and put in a
name for the folder, it worked perfectly.

---------------- Start here in Opera6.adr
#URL
    ID=314
    NAME=Top4x4Sites.com
    URL=http://top4x4sites.com/top.htm
    CREATED=1018320954
    VISITED=1018320954

-

#FOLDER
    ID=315
    CREATED=1093150353

-

--------------------------------------------- End Opera6.adr
(Reporter)

Comment 14

14 years ago
Firefox 1.0 RC1 has still this problem.
Flags: blocking-aviary1.0?
(Assignee)

Comment 15

14 years ago
I can reproduce this on Windows, but not on Linux. It's a mystery because I
can't find any platform-specific code in nsOperaProfileMigrator.cpp (especially
ParseBookmarkFolder())that can affect importing. 

On Windows, UTF-8 strings are interpreted as if they're in ISO-8859-1, but I
couldn't figure out where that happens by inspection. I need to build a debug
build on Windows and track it down. 
(Reporter)

Comment 16

14 years ago
I think that i know where is a problem. I will create a patch.
(Reporter)

Comment 17

14 years ago
Created attachment 163947 [details] [diff] [review]
Patch

Patch
(Assignee)

Comment 18

14 years ago
Comment on attachment 163947 [details] [diff] [review]
Patch

r=jshin

Aha. that's why I didn't see it on my trunk build of firefox on Linux while
firefox 1.0PR on Windows has a problem. I thought the aviary-1.0 branch and the
trunk are are almost in sync as far as the profile migrator is concerned. The
trunk source doesn't have a single line of 'ASCIItoUTF16' which would have
turned up my alarm level immediately.  All I saw was 'CopyUTF8toUTF16'.
Attachment #163947 - Flags: superreview?(bugs)
Attachment #163947 - Flags: review+
Attachment #163947 - Flags: approval-aviary?
(Assignee)

Comment 19

14 years ago
this 1.0 only.
OS: Windows XP → All
Version: unspecified → 1.0 Branch
Comment on attachment 163947 [details] [diff] [review]
Patch

since this is isolated, sr+a=ben@mozilla.org. please land asap. freeze is
tuesday.
Attachment #163947 - Flags: superreview?(bugs)
Attachment #163947 - Flags: superreview+
Attachment #163947 - Flags: approval-aviary?
Attachment #163947 - Flags: approval-aviary+
(Assignee)

Comment 21

14 years ago
fix checked into aviary-1.0 branch. thanks for sr/a and the patch.
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → FIXED

Updated

14 years ago
Flags: blocking-aviary1.0?
Keywords: fixed-aviary1.0
You need to log in before you can comment on or make changes to this bug.