Date Error German

Can anyone tell me how i can fix it? THX!

http://s4.directupload.net/file/d/1482/dmpzcqic_jpg.htm

März is written very badly...

Comments

  • fetard Member
    Is the missing caracter accentuated ? It could be a page-encoding problem.
  • acrylian Administrator, Developer
    I would guess too that this is an encoding problem, since I don't have that problem. Are your theme files saved as utf-8?
  • First, be sure you are on zenphoto 1.1.7. Language translation is a work in progress. The beta version (1.1.6) did not properly output the month names it got from PHP.
  • hallo Member
    http://www.testdesignzen.ch.vu/

    I saved the file as utf-8... I have also several problems with the umlaut... Any idea how I can fix it?

    another problem: my gallery works, but if someone wants to save a photo, the name of the photo is "i.php.jpg"... so how can i fix this problem? By reload the page, the right name is supposed...
  • hallo Member
    push...
  • acrylian Administrator, Developer
    I took a look at your site, I don't encounter any problems with "umlauts". A reason might be the domain redirection you have or the encoding of your database. Did you try to set an default encoding in your browser, too?

    Also I don't have any problems downloading a photo under it's name. Sorry, can't
  • hallo Member
    It's because i changed the data format...

    Can you take a look now? i changed it...

    08 M舐z 2008

    I don't know why...

    Yes, there is a redirection... Is there a better way to do it? Also without redirection I have this problem...
  • acrylian Administrator, Developer
    I see it on your site, but I can't reproduce it on my 1.1.7 install with the same theme. I am sorry, I have no idea. Does that appear only with your modified stopdesign theme or with the default themes ones, too?
  • hallo Member
    I uploaded the default theme and zp-core also, but the problem is almost there...

    So, can anyone tell me where this data definitions are? In which file? So I can change anything and perhabs it will work later...

    Yesterday, when I uploaded my folders with the pictures I had also several problems with this umlaute and space keys in my folder names... So i had to rename them to "ae" "oe" and take out the spaces etc and then I renamed the folders in the central administration... And it works...

    But I have no idea what the cause of the problem with "März" is...
  • acrylian Administrator, Developer
    The months names are generate by php, there is no string for "März" or any other month name you can change manually. I assume your server has the german locale installed? Maybe try a date setting without a month name for now and maybe you could post your phpinfo(), too?
  • acrylian Administrator, Developer
    Yes, most german hosts do not allow umlauts in file names (even if its theoretically possible). The best is always to rename them before uploading (or uploading via the admin backend, at least for the image names zenphoto should do that for you, the album folder renaming is a little buggy right now).
  • Regards Märtz, did you upgrade to 1.1.7 where it is fixed?
  • hallo Member
    Yes, I did... Tomorrow i will start a new installation and then I'll see if there is a problem with my "old" script or perhabs with the server, who knows...
  • hallo Member
    so, I uploaded a complete new script, I didn't change anything and the problem is almost there. I changed also the theme, but without luck... I looked at my databases and scripts and they're all with "utf-8"... I have no ideas what the problem could be... but is there any possibility to change the date? i mean, there are only 2 albums with this Problem, and März is the only month with a umlaut.. And I want to use this date format "1. März 2008"...
  • The date text is being provided by PHP from a call on `strftime()` in the function `zpFormattedDate()`. This function can be found in `functions.php` circa line 744. The string returned is supposed to be converted to UTF-8 by the `return utf8::convert($fdate, '', getOption('charset'));` line. You can try playing with that line and see if something works.
  • hallo Member
    finally, we could solve this problem...
  • acrylian Administrator, Developer
    And will you let us also know what the problem actually was and how you solved it?..:-)
  • hallo Member
    easy, nP ;)

    in the functions.php file, I changed the function zpFormattedDate()... While I want only one date format, even "1. Januar 2008", I changed it in this way (I know it isn't a proper solution):

    `function zpFormattedDate($format, $dt) {

    $mt = '?';

    switch (intval(date('n',$dt))) {

    case 1:

    $mt='Januar';

    break;

    case 2:

    $mt='Februar';

    break;

    case 3:

    $mt='März';

    break;

    case 4:

    $mt='April';

    break;

    case 5:

    $mt='Mai';

    break;

    case 6:

    $mt='Juni';

    break;

    case 7:

    $mt='Juli';

    break;

    case 8:

    $mt='August';

    break;

    case 9:

    $mt='September';

    break;

    case 10:

    $mt='Oktober';

    break;

    case 11:

    $mt='November';

    break;

    case 12:

    $mt='Dezember';

    break;

    }

    $fdate = date('j. ',$dt).$mt.date(' Y',$dt);

    return $fdate;

    }`

    ... And I deleted the old function. And now it works fine!
  • Can you tell us something? Does your PHP have the `mb_internal_encoding()` function? If so can you tell us what encoding it returns?
  • hallo Member
    ISO-8859-1

    `<?php<br />
    /* Set internal character encoding to UTF-8 */

    mb_internal_encoding("UTF-8");

    /* Display current internal character encoding */

    echo mb_internal_encoding();

    ?>

    `

    But it's not tragic, it works now...
  • Thanks. We have made some changes (which I will add to now that I have this information) Perhaps you can try the nightly build tomorrow to see if that works correctly. Otherwise, the change you made will work, it is just going to be a maintenance problem for you.
Sign In or Register to comment.