Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#89 Mozilla Bookmark import ignores encoding

closed-fixed
Barry Nauta
None
5
2006-06-01
2006-05-25
Lucas B.
No

The import routine seems to ignore the encoding of the
items. After import foreign characters are not readable
anymore.

Discussion

  • Barry Nauta
    Barry Nauta
    2006-05-30

    Logged In: YES
    user_id=96199

    Which version of Brim are you using?

     
  • Barry Nauta
    Barry Nauta
    2006-05-30

    • status: open --> pending
     
  • Lucas B.
    Lucas B.
    2006-05-30

    • status: pending --> open
     
  • Lucas B.
    Lucas B.
    2006-05-30

    Logged In: YES
    user_id=964337

    brim 1.1.4 with php5 without unicode support... do I need a
    unicode build of php?

     
  • Barry Nauta
    Barry Nauta
    2006-05-31

    Logged In: YES
    user_id=96199

    Actually... I don't know...

    Could you send me a (subset) of your bookmarks file? I will
    have a look....

     
  • Barry Nauta
    Barry Nauta
    2006-05-31

    • assigned_to: nobody --> barrel
    • status: open --> pending
     
  • Lucas B.
    Lucas B.
    2006-05-31

    Logged In: YES
    user_id=964337

    There seems to be a general problem with charsets and brim.
    Brim seems to generates every page in UTF-8, ignoring the
    charset that the webserver uses to send the page. But thats
    only a guess. When I change my default charset in apaches
    httpd.conf from ISO-8859-1 to UTF-8 everything works fine. I
    attached a minimal bookmarks file which didnt work with my
    apache configuration (but it works on the demo server!).

     
  • Lucas B.
    Lucas B.
    2006-05-31

    bookmarks file

     
    Attachments
  • Lucas B.
    Lucas B.
    2006-05-31

    • status: pending --> open
     
  • Barry Nauta
    Barry Nauta
    2006-05-31

    Logged In: YES
    user_id=96199

    Your guess is correct. Previous problems with charsets made
    me decide to render every page in utf8.
    Reason is simple: I have bookmarks from pages in different
    languages (from french to korean) and always had problems
    with charsets. After the change to UTF8, everything worked
    fine for me.

    I will do some more reading up on this subject. Not sure how
    I can resolve this for once and for all, for everyone.

    B.t.w. Your bookmarks import fine in my installation, as you
    probably would have guessed.

     
  • Lucas B.
    Lucas B.
    2006-05-31

    Logged In: YES
    user_id=964337

    After brwosing through the php manual I found the following
    solution: You might want to add
    header("Content-Type: text/html; charset=utf-8");
    in an appropriate place. That fixes the problem for me.

     
  • Barry Nauta
    Barry Nauta
    2006-05-31

    Logged In: YES
    user_id=96199

    Well... that will only work of you stdout content if I am
    not mistaken?

    Since I use a template, it is the template that takes care
    of this, perhaps there might be the answer. Anyway, all the
    templates (should) state their charset directly after the
    html declaration which should be sufficient for the browser....

     
  • Barry Nauta
    Barry Nauta
    2006-05-31

    Logged In: YES
    user_id=96199

    By the way; does this problem occur with all templates?
    Whcih browser do you use? Did you try other browsers?

     
  • Lucas B.
    Lucas B.
    2006-05-31

    Logged In: YES
    user_id=964337

    > does this problem occur with all templates?
    yes.
    > Whcih browser do you use?
    firefox 1.5
    > Did you try other browsers?
    no.
    > Anyway, all the templates (should) state their charset
    directly after the html declaration which should be
    sufficient for the browser
    No. Most Browsers use the charset given in the HTTP Response
    Header. Just add the code line of my last post in the first
    line (directly after <?) of the template.tpl.php, and
    everything works.

     
  • Barry Nauta
    Barry Nauta
    2006-06-01

    Logged In: YES
    user_id=96199

    Thanks for the correction. I'll add (and test) it!

     
  • Barry Nauta
    Barry Nauta
    2006-06-01

    • status: open --> closed-fixed