Fork me on GitHub

Watch

GitHub Core

Show your support for Zikula! Sign up at Github account and watch the Core project!




GitHub Modules

Forum Activity

Forum feed

» Visit forum | » View latest posts

Charset problems after upgrade  Bottom

Go to page 1 - 2 [+1]:

  • The special Danish charachters but also accented characters are shown like this: "R�kkef�lge" - should have been this: "Rækkefølge". MySQL is running UTF8 charset and I remember something being said about charset in the upgrade, but AFAIK it should be UTF8.

    Anyway, config.php says: $PNConfig['DBInfo']['default']['dbcharset'] = 'utf8'; so it should work, right?
    It worked perfect with 1.12.

    --
    /Lars
  • from a certain module?

    also - I think I read something about making sure your theme has the right setting in the header, but being an America, I don't get this multilingual stuff...
  • Yes, it is from Mediashare - which incidently also ceased working with lightbox. There is no next/previous function in the lightbox anymore...???

    You can see it here: http://koontz.dk/index.php?module=Mediashare&func=view&aid=11 at the top it says "Frim�rker" where it should have said "Frimærker" (Stamps).

    --
    /Lars
  • Seems that the language files from Mediashare are not UTF-8.
    Simply convert them to UTF-8:

    Code

    find . -name "*.php" -exec iconv -f ISO-8859-15 -t UTF-8 {} -o {} \;
    find . -name "*.htm" -exec iconv -f ISO-8859-15 -t UTF-8 {} -o {} \;


    --
    | scribite! | TNGz | piwik | zweet |
  • How do I execute these commands? I am on a ISPs server (one.com), I can't get a command prompt.
    In which directory do I execute them?

    --
    /Lars
  • You may do it locally,
    I don't know if that works for windows
    but I'm sure they works for my Ubuntu icon_smile

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Or just convert the files in modules/mediashare/pnlang/dan/ locally with your favorite text-editor.
  • I guess that Sven mentioned that he doesn't recommend notepad for that job, personally i recommend Geany.

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Be carefull with the statements.
    In my test they made the files 0 bytes icon_frown it seems that the iconv statement with output to the same file does not work?

    hilope

    Seems that the language files from Mediashare are not UTF-8.
    Simply convert them to UTF-8:

    Code

    find . -name "*.php" -exec iconv -f ISO-8859-15 -t UTF-8 {} -o {} \;
    find . -name "*.htm" -exec iconv -f ISO-8859-15 -t UTF-8 {} -o {} \;


    --
    campertoday.nl, Module development, Dutch Zikula Community
  • espaan

    Be carefull with the statements.
    In my test they made the files 0 bytes icon_frown it seems that the iconv statement with output to the same file does not work?


    Script is from slam/Chris and I think he's an expert in bash-scripting ... never thought of problems ;)

    And it works fine for me.

    --
    | scribite! | TNGz | piwik | zweet |
  • Maybe you can try this:

    Code

    for file in $(find . \( -name '*.php' -o -name '*.htm' \) -type f); do iconv -f ISO-8859-15 -t UTF-8 "$file" -o "$file.iconv"; rm "$file"; mv "$file.iconv" "$file"; done


    Regards,
    ph

    edit:
    or even

    Code

    for file in $(find . \( -name '*.php' -o -name '*.htm' \) -type f); do iconv -f ISO-8859-15 -t UTF-8 "$file" -o "$file.iconv"; if [ -s "$file.iconv" ]; then rm "$file"; mv "$file.iconv" "$file"; else echo "error with $file"; fi; done




    edited by: ph, datetimebrief
  • hilope

    espaan

    Be carefull with the statements.
    In my test they made the files 0 bytes icon_frown it seems that the iconv statement with output to the same file does not work?


    Script is from slam/Chris and I think he's an expert in bash-scripting ... never thought of problems ;)

    And it works fine for me.


    But experts have a habbit of not testing scripts icon_biggrin Maybe it works in some cases, but in my case on the webserver and on linux here at work the script gives empty files !

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • ph

    Maybe you can try this:

    Code

    for file in $(find . \( -name '*.php' -o -name '*.htm' \) -type f); do iconv -f ISO-8859-15 -t UTF-8 "$file" -o "$file.iconv"; rm "$file"; mv "$file.iconv" "$file"; done


    Regards,
    ph

    edit:
    or even

    Code

    for file in $(find . \( -name '*.php' -o -name '*.htm' \) -type f); do iconv -f ISO-8859-15 -t UTF-8 "$file" -o "$file.iconv"; if [ -s "$file.iconv" ]; then rm "$file"; mv "$file.iconv" "$file"; else echo "error with $file"; fi; done
    edited by: ph, datetimebrief



    That looks more robust indeed

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • ph

    Maybe you can try this:

    Code

    for file in $(find . \( -name '*.php' -o -name '*.htm' \) -type f); do iconv -f ISO-8859-15 -t UTF-8 "$file" -o "$file.iconv"; rm "$file"; mv "$file.iconv" "$file"; done


    Regards,
    ph

    edit:
    or even

    Code

    for file in $(find . \( -name '*.php' -o -name '*.htm' \) -type f); do iconv -f ISO-8859-15 -t UTF-8 "$file" -o "$file.iconv"; if [ -s "$file.iconv" ]; then rm "$file"; mv "$file.iconv" "$file"; else echo "error with $file"; fi; done
    edited by: ph, datetimebrief

    Specially the 2nd one is indeed much better than my raw construct (yes I tested and used it several times, but not extensively, and I see that it can have issues in some cases). icon_smile
    Actually, there are many different solutions - we could even extend it to find out the correct existing encoding automaticly (if we do not have mixed content in one file).
    Greetings,
    Chris

    --
    an operating system must operate
    development is life
    my repo
  • I use uni2me from this website: http://alf-li.pcdiscuss.com/e_index.html
    Important is to change the settings uncheck the "add BOM to the UTF8"

    it is running without installation on Windows machines.

    If you have a complete download of your website, you can use a trick to make a translation of your whole site:
    windows search in folder module for "pnlang" Than you can sort the result by name, mark all folders and zip them by right click context menue. This zip file contains all language files of you website inside the right path. Now unzip this zip, use uni2me and translate folder by folder by overwriting you lang files. Finaly you can upload them to your site.

    Tooks me 10 minutes icon_wink



    edited by: rallek, datetimebrief

    --
    webmaster of pggo.de

Go to page 1 - 2 [+1]:

This list is based on users active over the last 60 minutes.