Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar entries and descriptions containing umlauts are not shown (WebCalendar 1.2.9) #39

Open
codifex opened this issue Aug 25, 2017 · 3 comments

Comments

@codifex
Copy link

codifex commented Aug 25, 2017

I updated WebCalendar 1.2.7 to 1.2.9 and switched from PHP 5.3 to PHP 5.6. My WebCalendar install is used in German language and thus data entered in the calendar can contain umlauts.

Strings in my WebCalendar database use the encoding 'latin1' (ISO-8859-1).

Unfortunately updating the PHP version to anything higher than 5.3 breaks WebCalendar. More specifically, calendar entry titles and descriptions containing umlauts and other special characters are not shown in the calendar.

There has been an according bug report on SourceForge: https://sourceforge.net/p/webcalendar/bugs/2709/

I believe this problem will affect most people using a language other than English.

(I was able to circumvent the problem by switching everything to UTF-8, which, however, required a change in a WebCalendar core PHP file to set the proper encoding, see #33).

@htukiain
Copy link

htukiain commented Oct 2, 2017

please check in case you can change the .htaccess file for encoding.
In our installation it fixed issues with umlatus / scandinativan letters.

@bbannon
Copy link
Contributor

bbannon commented Oct 2, 2017

We are looking into this. I put in a pull request for a tentative .htaccess file. I'd like to hear comments / suggestions on that.
I'm updating the code base to utf-8. Craig is testing that pull request.
Also, in my case at least, my ISP has switched to utf-8 as default charset. I don't know if this is a general thing more ISPs will do or not.

@FranzGotsis
Copy link

I had the same problem and could solve the issue for MySQL/MariaDB the following way:

  1. Transform all encodings in the database to utf-8 via phpMyAdmin (operating on MySQL and MariaDB).

  2. Ensure that the database connection is using utf-8, by modifiying the file includes/dbi4php.php
    from line 117 onwards:
    add the following lines:

    $original_character_set = $c->character_set_name();
    if (strpos(strtolower($original_character_set),"utf") == false)
    {
    $fgcharsetName = "utf8";
    $resultOfCharsetChange = $c->set_charset ($fgcharsetName);
    }

Side-Effect:
A crude change of the encoding for the tables causes the existing special characters (for instance German Umlaute) to be displayed incorrectly. Everything new will be displayed correctly.
The way I coped with that is to export the database to a file. Change the encoding to utf-8 correct anything (search/replace) that does not look the way it should do and reimport the file into the existing database. That way all data is displayed correctly. Once everything is moved to utf-8 there is very little need to use another character set and whatever language the user sets in the browser, the event data is displayed correctly. In my case I use English and German language browsers and in both cases the special characters are displayed correctly (Umlaute).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants