Menu

#2709 German umlaut in summary prevent appointment to be displayed in calendar

Feature_request
open
nobody
None
5
2018-10-12
2013-10-31
Rolf
No

When I add a new entry for a day with a German umlaut in the summary, for the new created appointment is displayed only the bullet in the calendar, but not the summary. First when hovering the mouse over the bullet I can read the detailed description. When I open this appointment to change it, all fields are blank. With an earlier version installed I haven't had this problem.

Systemeinstellungen

PROGRAM_NAME: WebCalendar v1.2.6 (07 Jan 2013)

SERVER_SOFTWARE: Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.19

Web Browser: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Firefox/24.0

PHP Version: 5.4.19

Default Encoding:

db_type: mysql

readonly: N

single_user: N

single_user_login:

use_http_auth: N

user_inc: user.php

ADD_LINK_IN_VIEWS: N

ADMIN_OVERRIDE_UAC: Y

ALLOW_ATTACH: N

ALLOW_ATTACH_ANY: N

ALLOW_ATTACH_PART: N

ALLOW_COLOR_CUSTOMIZATION: Y

ALLOW_COMMENTS: N

ALLOW_COMMENTS_ANY: N

ALLOW_COMMENTS_PART: N

ALLOW_CONFLICTS: N

ALLOW_CONFLICT_OVERRIDE: Y

ALLOW_EXTERNAL_HEADER: N

ALLOW_EXTERNAL_USERS: N

ALLOW_HTML_DESCRIPTION: Y

ALLOW_SELF_REGISTRATION: N

ALLOW_USER_HEADER: N

ALLOW_USER_THEMES: Y

ALLOW_VIEW_OTHER: Y

APPLICATION_NAME: Webkalender

APPROVE_ASSISTANT_EVENT: Y

AUTO_REFRESH: N

AUTO_REFRESH_TIME: 0

BGCOLOR: #FFFFFF

BGREPEAT: repeat fixed center

BOLD_DAYS_IN_YEAR: Y

CAPTIONS: #B04040

CATEGORIES_ENABLED: Y

CELLBG: #C0C0C0

CONFLICT_REPEAT_MONTHS: 6

CUSTOM_HEADER: N

CUSTOM_SCRIPT: N

CUSTOM_TRAILER: N

DATE_FORMAT: LANGUAGE_DEFINED

DATE_FORMAT_MD: LANGUAGE_DEFINED

DATE_FORMAT_MY: LANGUAGE_DEFINED

DATE_FORMAT_TASK: LANGUAGE_DEFINED

DEMO_MODE: N

DISABLE_ACCESS_FIELD: N

DISABLE_CROSSDAY_EVENTS: N

DISABLE_LOCATION_FIELD: N

DISABLE_PARTICIPANTS_FIELD: N

DISABLE_POPUPS: N

DISABLE_PRIORITY_FIELD: N

DISABLE_REMINDER_FIELD: N

DISABLE_REPEATING_FIELD: N

DISABLE_URL_FIELD: Y

DISPLAY_ALL_DAYS_IN_MONTH: N

DISPLAY_CREATED_BYPROXY: Y

DISPLAY_DESC_PRINT_DAY: Y

DISPLAY_END_TIMES: N

DISPLAY_LOCATION: N

DISPLAY_LONG_DAYS: N

DISPLAY_MINUTES: N

DISPLAY_MOON_PHASES: N

DISPLAY_SM_MONTH: Y

DISPLAY_TASKS: N

DISPLAY_TASKS_IN_GRID: N

DISPLAY_UNAPPROVED: Y

DISPLAY_WEEKENDS: Y

DISPLAY_WEEKNUMBER: Y

EMAIL_ASSISTANT_EVENTS: Y

EMAIL_EVENT_ADDED: Y

EMAIL_EVENT_CREATE: N

EMAIL_EVENT_DELETED: Y

EMAIL_EVENT_REJECTED: Y

EMAIL_EVENT_UPDATED: Y

EMAIL_FALLBACK_FROM: youremailhere

EMAIL_HTML: N

EMAIL_MAILER: mail

EMAIL_REMINDER: Y

ENABLE_CAPTCHA: N

ENABLE_GRADIENTS: N

ENABLE_ICON_UPLOADS: N

ENTRY_SLOTS: 144

EXTERNAL_NOTIFICATIONS: N

EXTERNAL_REMINDERS: N

FONTS: Arial, Helvetica, sans-serif

FREEBUSY_ENABLED: N

GENERAL_USE_GMT: Y

GROUPS_ENABLED: N

H2COLOR: #000000

HASEVENTSBG: #FFFF33

IMPORT_CATEGORIES: Y

LANGUAGE: none

LIMIT_APPTS: N

LIMIT_APPTS_NUMBER: 6

LIMIT_DESCRIPTION_SIZE: N

MENU_DATE_TOP: Y

MENU_ENABLED: Y

MENU_THEME: default

MYEVENTS: #006000

NONUSER_AT_TOP: Y

NONUSER_ENABLED: Y

OTHERMONTHBG: #D0D0D0

OVERRIDE_PUBLIC: N

OVERRIDE_PUBLIC_TEXT: Not available

PARTICIPANTS_IN_POPUP: N

PLUGINS_ENABLED: N

POPUP_BG: #FFFFFF

POPUP_FG: #000000

PUBLIC_ACCESS: N

PUBLIC_ACCESS_ADD_NEEDS_APPROVAL: N

PUBLIC_ACCESS_CAN_ADD: N

PUBLIC_ACCESS_DEFAULT_SELECTED: N

PUBLIC_ACCESS_DEFAULT_VISIBLE: N

PUBLIC_ACCESS_OTHERS: Y

PUBLIC_ACCESS_VIEW_PART: N

PUBLISH_ENABLED: Y

PULLDOWN_WEEKNUMBER: N

REMEMBER_LAST_LOGIN: N

REMINDER_DEFAULT: N

REMINDER_OFFSET: 240

REMINDER_WITH_DATE: N

REMOTES_ENABLED: N

REPORTS_ENABLED: N

REQUIRE_APPROVALS: Y

RSS_ENABLED: N

SELF_REGISTRATION_BLACKLIST: N

SELF_REGISTRATION_FULL: Y

SEND_EMAIL: N

SERVER_TIMEZONE: Europe/Berlin

SERVER_URL: https://telefonix.dyndns-web.com/webkal/

SITE_EXTRAS_IN_POPUP: N

SMTP_AUTH: N

SMTP_HOST: localhost

SMTP_PORT: 25

STARTVIEW: week.php

SUMMARY_LENGTH: 80

TABLEBG: #000000

TEXTCOLOR: #000000

THBG: #FFFFFF

THEME: none

THFG: #000000

TIMED_EVT_LEN: D

TIMEZONE: America/New_York

TIME_FORMAT: 24

TIME_SLOTS: 24

TIME_SPACER: »

TODAYCELLBG: #FFFF33

UAC_ENABLED: N

UPCOMING_ALLOW_OVR: N

UPCOMING_DISPLAY_CAT_ICONS: Y

UPCOMING_DISPLAY_LAYERS: N

UPCOMING_DISPLAY_LINKS: Y

UPCOMING_DISPLAY_POPUPS: Y

UPCOMING_EVENTS: N

USER_PUBLISH_ENABLED: Y

USER_PUBLISH_RW_ENABLED: Y

USER_RSS_ENABLED: N

USER_SEES_ONLY_HIS_GROUPS: Y

USER_SORT_ORDER: cal_lastname, cal_firstname

WEBCAL_PROGRAM_VERSION: v1.2.6

WEBCAL_TZ_CONVERSION: Y

WEEKENDBG: #D0D0D0

WEEKEND_START: 6

WEEKNUMBER: #FF6633

WEEK_START: 1

WORK_DAY_END_HOUR: 20

WORK_DAY_START_HOUR: 8

1 Attachments

Discussion

  • io!

    io! - 2014-03-22

    I can confirm this. After updating PHP5.3.3 => 5.4, I encounter the exact same problem. My Webcalendar version is 1.2.5.

    This may be related to PHP5.4 having moved to UTF-8 as default encoding.

    I propose the following code change (to simply revert to the previous default behaviour of htmlspecialchars()):

    File: includes/functions.php (Line: 167/168)
    Function: build_entry_label()
    Code: $tmp_ret = htmlspecialchars ( substr ( $tmpName, 0, $sum_length )
    . ( strlen ( $tmpName ) > $sum_length ? '...' : '' ) );
    Change to: $tmp_ret = htmlspecialchars ( substr ( $tmpName, 0, $sum_length )
    . ( strlen ( $tmpName ) > $sum_length ? '...' : '' ), ENT_COMPAT, 'ISO-8859-1' );

    Although this fix works, I don't understand how a single "bad" character can null the whole return value of the function, this should imho. not happen.

    io.

     
  • Rolf

    Rolf - 2014-03-22

    With this change a new appointment with the German umlauts are displayed correctly. But when I open this appointment again to change it, the German umlauts are not visible so I can't change the description.

     
  • gun7

    gun7 - 2014-12-12

    WebCalendar v1.2.5 (29 Feb 2012) works fine with PHP Version 5.3.3-7+squeeze19

    WebCalendar v1.2.7 (22 Feb 2013) same Problem with PHP Version 5.4.35-0+deb7u2

    The Codechange as proposed does not solve the problem as Rolf mentioned.
    When I enter the appointment the second time the text with umlauts is still erased.

     

    Last edit: gun7 2014-12-12
  • koller

    koller - 2015-04-30

    here the same. 5.3.3.7 works fine
    php 5.4.4 problem exist

    we need the 5.4.4 for an other application on this server? is there any solution?

     
  • NSK

    NSK - 2015-08-06

    I encountered this problem as well and came up with the identical workaround as io! posted. Additionally I fixed this for the entry editor as well:

    edit_entry.php
    line 612

    previous:
    . 'size="25" value="' . htmlspecialchars ( $name ) . '" />

    fixed:
    . 'size="25" value="' . htmlspecialchars ( $name, ENT_COMPAT | ENT_XHTML, "ISO-8859-1" ) . '" />

    My information source for this change is the php.net discussion: http://php.net/manual/de/function.htmlspecialchars.php#111666

    I don't know why this guy includes the ENT_XHTML flag additionally to ENT_COMPAT, but I don't care as it seems to work both ways.

    But I don't feel comfortable with this workarounded fix and would like to have the webcalendar devs fix this properly.

    Reasons:
    grep -Rl "htmlspecialchars\|htmlentities" /srv/web/WebCalendar-1.2.7 lists a lot of other usages of the affected php methods
    file -i /srv/web/WebCalendar-1.2.7/includes/functions.php shows "charset=us-ascii" which proves that the above fix is limited to quite few characters (if I understand the problem correctly) - a proper approach would be to save the files in utf8
    * of course, ISO-8859-1 fixes stuff only for characters it is containing....

     
  • gwahl

    gwahl - 2017-10-05

    Any news on this one?

     
  • Rolf

    Rolf - 2017-10-05

    After applying the proposal written 2014-03-22 German Umlauts are stored and can be reopened in the brief description but the detailed description with German Umlauts get completely lost when reopeing this appointment.

     
  • Anna Schricker

    Anna Schricker - 2018-10-12

    I had the same problem with German umlauts after upgrading from webcalendar 1.2.3 to 1.2.9. I first tried with io!'s solution but then after saving an entry and editing it again all the html showed in the description so I reverted this.

    I added to config.php (at the end):
    ini_set('default_charset', 'iso-8859-1');

    this did the trick for me.

     

Log in to post a comment.